I was trying to install Android Studio Electric Eel on a laptop but after installation when I'm trying to open this error comes,
failed to load jvm dll android studio
I already,
Added JAVA_HOME in system variables,
Added path of Java bin folder,
try this, it's worked for me
just delete the jre folder and it starts working(restart android studio)...
C:\Program Files\Android\Android Studio\jre
The problem is because of traces of old Android Studio java folder,The new Android Studio Electric Eel is using jbr, not jre.
You also need to add your bin directory path in path System Variable
Edit System Variables and add your path as follow
Android studio v4.2.1 installation folder not recognize when I select Help -> Edit Custom VM Options...
it show below path.
Whereas my Android Studio installed in C:\Android\Android Studio.
I set STUDIO_VM_OPTIONS=C:\Android\Android Studio\bin but not working.
Seems you are not installing Android Studio to the default location path which is : C:\Program Files\Android\Android Studio, and the Android SDK should be installed at : C:\Users\username\AppData\Local\Android\Sdk.
Check out this URL for guidance : https://www3.ntu.edu.sg/home/ehchua/programming/android/Android_HowTo.html#:~:text=by%20default%2C%20the%20%22Android%20Studio,Local%5CAndroid%5CSdk%20%22.
Try to re-install your Android Studio using the default options and paths.
Copy the file studio64.exe.vmoptions from the following path:
C:\Program Files\Android\Android Studio\bin
to
C:\Users\home\AppData\Roaming\Google\AndroidStudio4.2
Move your Android Studio folder to C:\Users\your.username\Android-Studio and retry
Sometimes cmd not recognize your file location , maybe permissions or other thinks.
I recently installed Android Studio 2.3.3 on my Mac, but I forgot to install JDK 8 before setting up Android Studio. I am already halfway through the development process of my App, so know I don't want to uninstall Android Studio, then install JDK 8 and again reinstall Android Studio, so should I uninstall Android Studio for JDK 8, is it really that important?
First thing, JDK is important in Android Studio to compile your .java files. As you said you are half way through your development process ,there is a JVM in your machine(not necessarily JDK-8).
Android by default installs a JVM in your computer.
Open a project in Android studio,
Goto File -> Project Structure -> SDK location
There you can see, default JDK location, if there is no such thing then,
1.install JDK-8, and Set the Environmental variables.
2.Set the jdk path in the JDK location in the android studio.
I am getting this issue repeatedly "Installing Android Studio, does not point to a valid JVM installation error" while launching Android Studio.
I have installed Eclipse and Android studio Both on My System. Eclipse is working fine but Android Studio is not Working now. Means Before Installation of Eclipse it was working well.
I have Set the Path="C:\Program Files(x86)\Java\jdk1.8.0_45\bin".
And I have also installed jdk1.7.0 and jdk1.6.0_07 on my system.
![enter image description here][1]
Android Studio Works With JDK 7 ans JDK 8 both:
Need to set jdk path like this;
JAVA_HOME = "C:\Program Files(x86)\Java\jdk1.8.0_45"
I had Java 1.7.0_21 installed and I installed 1.7.0_45 today after uninstalling the previous version. Now Android Studio has stopped compiling projects and says that it cant locate the 1.7.0_21 folder. How can I set the new path for Java SDK? I have changed the environment variables also but didn't work.
Up to Android Studio 4.2
Go to File > Project Structure > SDK Location. The third field is "JDK Location" where you can set it. This will set it for the current project.
To set the default for new projects, go to File > Other Settings > Default Project Structure > SDK Location and set the "JDK Location".
Android Studio Arctic Fox (2020.3.1)
In the Canary 14 of Android Studio Arctic Fox (2020.3.1), the JDK Location setting is moved to:
Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK
Older Versions
Go to File > Project Structure > [Platform Settings] > SDKs. You'll need to either update you current SDK configuration to use the new directory, or define a new one and then change your project's settings to use the new one. This will set it for the current project.
To set the default for new projects, go to File > Other Settings > Structure for New Projects > [Platform Settings] > SDKs and set the SDK to use when creating a new project.
Go to File> Project Structure (or press Ctrl+Alt+Shift+S),
A popup will open now go to SDK Location Tab you will find JDK Location there refer this image to be more clear.
I tried updating all of my SDKs by just going into the Project Structure > Platform Settings > SDKs and changing the Java SDK, but that didn't work, so I had to recreate the configurations from scratch.
Here's how to create your SDKs with the latest Java:
In Project Structure > Platform Settings > SDKs, click the "+" button to add a new SDK.
In the pop-up, go into your Android SDK folder and click "Choose"
Another pop-up will appear asking for which SDK and JDK you want to use. Choose any Android SDK and the 1.7 JDK.
Go to Project Structure > Project Settings > Project and change your Project SDK to the one you just created. You should see the name of the SDK contain the new Java version that you installed.
C:\Program Files\Android\Android Studio\jre\bin>java -version
openjdk version "1.8.0_76-release"
OpenJDK Runtime Environment (build 1.8.0_76-release-b03)
OpenJDK 64-Bit Server VM (build 25.76-b03, mixed mode)
Somehow the Studio installer would install another version under:
C:\Program Files\Android\Android Studio\jre\jre\bin>java -version
openjdk version "1.8.0_76-release"
OpenJDK Runtime Environment (build 1.8.0_76-release-b03)
OpenJDK 64-Bit Server VM (build 25.76-b03, mixed mode)
where the latest version was installed the Java DevKit installer in:
C:\Program Files\Java\jre1.8.0_121\bin>java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Need to clean up the Android Studio so it would use the proper latest 1.8.0 versions.
According to How to set Java SDK path in AndroidStudio?
one could override with a specific JDK but when I renamed
C:\Program Files\Android\Android Studio\jre\jre\
to:
C:\Program Files\Android\Android Studio\jre\oldjre\
And restarted Android Studio, it would complain that the jre was invalid.
When I tried to aecify an JDK to pick the one in C:\Program Files\Java\jre1.8.0_121\bin
or:
C:\Program Files\Java\jre1.8.0_121\
It said that these folders are invalid. So I guess that the embedded version must have some special purpose.
This problem arises due to incompatible JDK version.
Download and install latest JDK(currently its 8) from java official site in case you are using previous versions. Then in Android Studio go to File->Project Structure->SDK location -> JDK location and set it to 'C:\Program Files\Java\jdk1.8.0_121' (Default location of JDK). Gradle sync your project and you are all set...
And now this is located in Gradle settings:
1) File >>> Project Structure OR press Ctrl+Alt+Shift+S
2) In SDK Location Tab you will find SDK Location:
3) Change your Project SDK location to the one you have installed
4) Sync your project
If you are using new android studio 2021+ then you can find or update JDK settings by navigating to
File > Settings... > Build, Execution, Deployment > Build Tools >
Gradle
on windows
Android Studio > Preferences... > Build, Execution, Deployment > Build
Tools > Gradle
on Mac
Go to File>Project Structure>JDK location:
Here, you have to set the directory path exactly same, in which you have installed the java version.
Also, you have to mention the paths of SDK for project run on emulator successfully.
Why This Problem Occurs: It is due to the unsynchronized java version directory that should be available to Android Studio for java code compilance.
Click "use embedded JDK" on version Android Studio 3.2.1