With android studio no jvm found, JAVA_HOME has been set

前端 未结 6 839
小蘑菇
小蘑菇 2020-12-23 21:41

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.

相关标签:
6条回答
  • 2020-12-23 21:51

    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
    
    0 讨论(0)
  • 2020-12-23 21:54

    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.

    0 讨论(0)
  • 2020-12-23 21:57

    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

    0 讨论(0)
  • 2020-12-23 22:00

    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.

    0 讨论(0)
  • 2020-12-23 22:02

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

    0 讨论(0)
  • 2020-12-23 22:10

    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
    
    0 讨论(0)
提交回复
热议问题