Installing Android Studio, does not point to a valid JVM installation error

132,316

Solution 1

Point your JAVA_HOME variable to C:\Program Files\Java\jdk1.8.0_xx\ where "xx" is the update number (make sure this matches your actual directory name). Do not include bin\javaw.exe in the pathname.

NOTE: You can access the Environment Variables GUI from the CLI by entering rundll32 sysdm.cpl,EditEnvironmentVariables. Be sure to put the 'JAVA_HOME' path variable in the System variables rather than the user variables. If the path variable is in User the Android Studio will not find the path.

Solution 2

It is absolutely possible that all other answers work for people but for me this path worked:

Leave your JDK path under JAVA_HOME System Variable as it is given here. Do not append bin or another path. It worked for me.

C:\Program Files\Java\jdk1.8.0_11\

Otherwise I am getting this error:

Installing Android Studio, does not point to a valid JVM installation error

Solution 3

Updated android studio to 1.2.1. Even though I was getting the same error. Nothing worked, finally replaced JAVA_HOME with JDK_HOME and it did the magic.

Solution 4

2 suggested solutions

  1. Upgrade JDK to 1.7

  2. Make sure the 32-bit or 64 bit versions match on both sides

Solution 5

Recently I am working with the 1.8.0_25 JDK version on Windows 8.1 and I had the same problem with this. But as PankaJ Jakhar said

The real solution for me was pretty simple:

  1. Add the JAVA_HOME variable to the system ones, not on the user ones.
  2. The path I introduced for this variable was:

    C:\Program Files\Java\jdk1.8.0_25\
    

And it works for me!

Share:
132,316
LegionDev
Author by

LegionDev

Java, php, Ingress

Updated on July 05, 2022

Comments

  • LegionDev
    LegionDev almost 2 years

    I just downloaded the Android Studio. While trying to run it, I had to modify the environment variable and add

    JAVA_HOME

    and

    C:\Progra~2\Java\jdk1.6.0_22

    Once I finished that hurdle, now I am receiving another error:

    The environment variable JAVA_HOME (with the value of *C:\Progra~2\Java\jdk1.6.0_22*) does not point to a valid JVM installation.
    

    I looked through other similar questions and I was asked to check the version, so I did the following in CMD:

    C:\Users\Andre>java -version
    java version "1.6.0_22"
    Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
    Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
    
    C:\Users\Andre>javac -version
    javac 1.6.0_22
    

    From the results it seems like I have JVM.

    I also tried these paths for JAVA_HOME, I closed and reopened a new CMD window each time

    C:\Program Files (x86)\Java\jre7
    C:\Program Files (x86)\Java\jre6
    C:\Program Files (x86)\Java\jdk1.6.0_22
    C:\Program Files (x86)\Java\jre7\bin
    C:\Program Files (x86)\Java\jre6\bin
    C:\Program Files (x86)\Java\jdk1.6.0_22\bin
    
  • CoronaPintu
    CoronaPintu almost 10 years
    i had download 1.8 install it giving path to jdk1.8/bin now it giving me this error
  • Lu Roman
    Lu Roman over 9 years
    Thanks, so the trick was to remove bin from the path, i did not try with bin\javaw.exe before. All the documentation tells you to include the bin folder... shame on them, well good tip :)
  • dangalg
    dangalg over 9 years
    For me it only worked when I used C:\Program Files\Java\jdk1.8.0_xx where "xx" is the update number without the \; at the end
  • surt91
    surt91 over 9 years
    Also important: do not sourround the path in quotes "C:/Pro...". That might be obvious for some, but unfortunately not for me.
  • Arttu
    Arttu over 9 years
    Did require a boot too.
  • Sabeer
    Sabeer over 9 years
    For me its worked only after removing the semi colon ";" at the end of the path...
  • Edeph
    Edeph over 9 years
    It shouldn't be the bin folder, but the root as pointed out in the answer!
  • Mill
    Mill about 9 years
    with the version 1.8.0_25 i'm still getting the error!
  • Rodrigo Venancio
    Rodrigo Venancio almost 9 years
    Last step helped me! I just had to remove "\bin" from my JAVA_HOME variable.
  • Robert
    Robert almost 9 years
    Oddly enough, it worked for me when I changed the user variable
  • Aman Alam
    Aman Alam almost 9 years
    This pointed towards the right direction. Also, I had to remove all the double quotes etc from the path and put it in system path
  • Narendra Pal
    Narendra Pal almost 9 years
    its really a magic, don't know why they not support JAVA_HOME for setting environment variable. But its done with JDK_HOME
  • Dominique
    Dominique over 8 years
    After an Android Studio update, same problem, same perfect solution.
  • shieldgenerator7
    shieldgenerator7 over 8 years
    This was my problem too. I removed the quotes and that solved it
  • Marcus Becker
    Marcus Becker over 8 years
    In my case, I have to remove the bin folder from JAVA_HOME
  • Seth
    Seth over 8 years
    Check it in your command line tool by typing "Java --version"
  • rummykhan
    rummykhan over 8 years
    I also had the similar error with JDK 1.8 64 bit installed, i remove JAVA_HOME variable from environments and wrote JRE and JDK path in PATH variable C:\Program Files\Java\jre1.8.0_65\bin;C:\Program Files\Java\jdk1.8.0_65\bin, now android studio is working fine, it automatically picked up the JVM Path. hope this will help someone