With android studio no jvm found, JAVA_HOME has been set
Asked Answered
L

6

44

I have a JAVA_HOME variable set to:

C:\Program Files (x86)\Java\jdk1.7.0_45\ And the path to the jdk is: C:\Program Files (x86)\Java\jdk1.7.0_45

However when I try to start android studio I get the error:

No JVM installation found. Please install a 64 bit JDK. If you already have a JDK installed define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables.

Lacunar answered 17/11, 2013 at 16:33 Comment(5)
Is this a system or a user environment variable. That might make a difference? (Not sure)Sansen
It is an environment variable, have tried both, doesn't appear to make a differenceLacunar
if you jdk is 64 bit it should be installed in "C:\Program Files\Java". "C:\Program Files (x86)\Java" is for 32 bits installs.Ausgleich
Can't I just use JDK 32 bits for my 64 bits PC?Smothers
For Windows 7 all Android Studio versions since 2022 don't work with symptoms like Java SDK, JAVA_HOME, etc Don't waste the time - downgrade the version to Android Studio 4.0.Fidge
B
86

It says that it should be a 64-bit JDK. I have a feeling that you installed (at a previous time) a 32-bit version of Java. The path for all 32-bit applications in Windows 7 and Vista is:

C:\Program Files (x86)\

You were setting the JAVA_HOME variable to the 32-bit version of Java. Set your JAVA_HOME variable to the following:

C:\Program Files\Java\jdk1.7.0_45

If that does not work, check that the JDK version is 1.7.0_45. If not, change the JAVA_HOME variable to (with JAVAVERSION as the Java version number:

C:\Program Files\Java\jdkJAVAVERSION
Bloodroot answered 17/11, 2013 at 17:27 Comment(1)
helpless for meSoundboard
D
13

Here is the tutorial :- http://javatechig.com/android/installing-android-studio and http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/

Adding a system variable JDK_HOME with value c:\Program Files\Java\jdk1.7.0_21\ worked for me. The latest Java release can be downloaded here. Additionally, make sure the variable JAVA_HOME is also set with the above location.

Please note that the above location is my java location. Please post your location in the path

Deferent answered 17/11, 2013 at 16:41 Comment(1)
I just had to add extra "\" at the end of jdk version. Before it was "C:\Program Files\Java\jdk1.7.0_79" changed it to "C:\Program Files\Java\jdk1.7.0_79\". How stupid that could be. :(Quarrier
W
2

Though, the question is asked long back, I see this same issue recently after installing Android Studio 2.1.0v, and JDK 7.80 on my PC Windows 10, 32 bit OS. I got this error.

No JVM installation found. Please install a 32 bit JDK. If you already have a JDK installed define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables.

I tried different ways to fix this nothing worked. But As per System Requirements in this Android developer website link.

Its solved after installing JDK 8(jdk-8u101-windows-i586.exe) JDK download site link.

Hope it helps somebody.

Wayside answered 3/9, 2016 at 19:32 Comment(1)
I was running JDK-12.0.1 and nothing I did worked until I downloaded and installed the JDK8 but mine was a 64 bit version, and Android Studio worked thereonTelescopic
S
2

For me the case was completely different. I had created a studio64.exe.vmoptions file in C:\Users\YourUserName\.AndroidStudio3.4\config. In that folder, I had a typo of extra spaces. Due to that I was getting the same error.

I replaced the studio64.exe.vmoptions with the following code.

# custom Android Studio VM options, see https://developer.android.com/studio/intro/studio-config.html

-server
-Xms1G
-Xmx8G
# I have 8GB RAM so it is 8G. Replace it with your RAM size.
-XX:MaxPermSize=1G
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-da
-Djna.nosys=true
-Djna.boot.library.path=

-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-Didea.paths.selector=AndroidStudio2.1
-Didea.platform.prefix=AndroidStudio
Spirant answered 24/7, 2019 at 17:0 Comment(1)
yes, same happened with me, I just deleted vmoptions file and restarted studio...Landpoor
S
1

When you set to install it "for all users" (not for the current user only), you won't need to route Android Studio for the JAVA_HOME. Of course, have JDK installed.

Sensibility answered 24/5, 2014 at 21:24 Comment(0)
F
1

Just delete the folder highlighted below. Depending on your Android Studio version, mine is 3.5 and reopen Android studio.

enter image description here

Foresheet answered 5/11, 2019 at 18:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.