android, java version comportable? on windows - java

I new installed windows 10 to study android/flutter and the version were below:
android-studio-2022.1.1.19-windows , jdk-19_windows-x64_bin.msi, flutter src.
But when I build and run it after AVD running, error related to gradle looks shown with error code 0.
What is a best combination to java version, android-studio version??
When I updated java version, the android studio didn't run anymore W/ message showing it couldnt loading jvm.dll and set JAVA_HOME. Of course I set JAVA_HOME.
Setting android studio is too hard to me.

Related

JAVA_HOME is set to an invalid directory Android Studio (Flutter)

I am using OSX Yosemite on my old mac. When I installed emulator and try to create a run a Flutter project, I started getting an error about JDK 17. I deleted JDK 17 and installed JDK and also set my path in bash profile to "Library/Java/JavaVirtualMachines/jdk-1.8.0_321.jdk/Contents/Home". However, my Android studio is still giving this error.
ERROR: JAVA_HOME is set to an invalid directory: /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Exception: Gradle task assembleDebug failed with exit code 1
I spent hours solving this. Please help me. Thank you very much.
For Windows:
The problem is because of trace of old Android Studio java folder, just delete this folder and it starts working:
C:\Program Files\Android\Android Studio\jre
The new Android Studio Electric Eel is using jbr, not jre.
For macOS:
If you are using macOS replace the path in .bash_profile or .zshrc
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home"
with
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
I resolved the issue. Problem was due to 2 versions of Android Studio installed on same device. One was in applications folder and other was in Downloads folder. I was using Android Studio in Downloads folder and it's installation files are referring to old JDK plugin that was set for another Android Studio because both have similar paths.
/Applications/AndroidStudio.app/Contents/plugins/java/lib/jdkAnnotations.jar
After deleting old Android Studio and moving other one into Application folder resolved my issue. Thanks everybody for helping me out.

Unable to launch Android Studio

I installed Android Studio a month ago and it worked successfully and I was using windows 7(64bit) Then I setup a new windows 7 (32bit) and I reinstalled the JDK and Android Studio and I even downloaded the latest version of Android Studio but it didn't work.
First, a message pop up to set environment variables which I did, then i I opened Android Studio again and another message appeared :
Could not find main class com/intellij/idea/main
I searched about that problem and found that the solution is to add JAVA_HOME with value
C:\Program Files\Java\jdk1.8.0_101
Then, I opened it again and it didn't work and no messages appeared. I tried to run the SDK but an error massage appeared:
I just quickly googled for this and it seems that for all the people that have had this issue the solution was to uninstall Android Studio, download the installer again and install it from scratch.

Android studio not installing even if JDK 8 is installed

I just downloaded Google's new android studio bundle(x64 for Windows) and also installed JDK8 (C:\Program Files\Java\jdk1.8.0_25) (x64 version).
But on the android studio setup it does not detect JDK and asks to locate its path. I located its path but still it says it is not valid.
I tried declaring new Environment variables (both system and User) but still I get same error.
I also tried in cmd, and it says that java & JDK is installed.
After that I reinstalled JDK 8 for windows x64 from Oracle. But no changes in android studio...
Please Help. !
I had the same problem. I discovered that it was caused because I installed the JDK while the Android Studio installer was still opened and at the prompt to load the location of the JDK. Closing the Android installer and then reloading it after the JDK installation had completed and was closed out, solved the installation problem for me.
In my case, I am using java8 and based on Doc I just had to add the following:
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
While running Java 6 something I tried to install Android Studio. Android Studio did not find Java 7 or Java 8, so it asked me to install at least Java 7 and gave a link to Java 7. While the original instance of Android Studio Installer was still alive, it would not find Java 7 or 8. killing and restarting Android Studio Installer worked just fine.
So install Java and restart the installer.
I have same error but i closely look into the note and then my problem solved :)
It needs JDK 7, as stated on the System Requirements page: http://developer.android.com/sdk/index.html#Requirements
Update:
For Android Studio 2.1, it needs JDK 8 for Windows or Linux, and JDK 6 for Mac.
I solved this problem by closing the installation file, and open it again as an administrator. Pre over the need to set jdk.

Android Studio stopped working properly for me

I installed some new virus protection and removed the one from my laptop. As I had to restart my laptop so that the updates could take effect, It would not restart properly. I ended up having to refresh my laptop to a previous time so that I could once again access my files. I am now downloading the files that I once had, but Android Studio is not allowing me to run the applications that I am trying to test out. I tried to include a screenshot of the issue but I don't have the reputation to do so. The error reads:
Failed to complete Gradle execution.
Cause:
Supplied javaHome is not a valid folder. You supplied: C:\Program Files\Java\jdk1.7.0_71
I've tried changing where JAVA_HOME was pointed to but I am still not getting the proper functionality from Android Studio.
Try to install JDK and JRE for x64 and x86 as well.

Error in running eclipse for android development- "Java was started but returned exit code 13"

I have installed adt bundle for android development. I am using Windows 7 32 bit. All the required packages for android have been installed successfully. But after setting up everything I am facing this error while running eclipse "Java was started but returned exit code 13". I have been searching about this error and tried all the possible solutions like setting up environment variables and checking out he java required version compatible with the installed jdk. But I am unable to fix this error. Kindly help me.
Kindly find out the error in png format in the following link:-
http://prminfotech.com/error.png
Thank you all for all your suggestions! I have found my solution. I copied the entire eclipse and sdk folder to C: Drive inside Program Files and now everything is working fine for me.

Categories

Resources