Android Studio error: "Environment variable does not point to a valid JVM installation"

102,936

Solution 1

Do step by step as shown in this YouTube Video

Go to: System -> Advanced system settings -> Environment Variables

Add a new variable to you profile NAME=JAVA_HOME STRING: Program Files/java/"your string" Save and Start Android Studio ;)

enter image description here

Solution 2

If you start 64bit Android Studio, you have to add JAVA_HOME as

    "C:\Program Files\Java\jdk..."

If 32bit

    "C:\Program Files(x86)\Java\jdk..."

and dont put "\bin" end of the path.

Solution 3

All you need to do is, set the JAVA_HOME and JDK_HOME environment variables by following the steps:

1)Right click on

My Computer.->>Properties->>Advanced System Settings.->>Environment Variables

.

2)In user variables for (Your PC name),click on new at botton of the tab.

3)In variable name,type JAVA_HOME

4)In variable value,type

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

(path where your jdk folder is located on the system ).

5)Do it again with JDK_HOME

with same path.

Solution 4

Providing both JAVA_HOME and JDK_HOME with identical Path without \bin helped for me! My settings:

  • JAVA_HOME

\Program Files\Java\jdk1.8.0_05

  • JDK_HOME

%JAVA_HOME%

  • PATH

...%JAVA_HOME%\bin

Solution 5

Just dont put "\bin" end of the path.

JAVA_HOME should be with value C:\Program Files(x86)\Java\jdk1.7.0_51

Share:
102,936

Related videos on Youtube

ifconfig
Author by

ifconfig

Student at the University of California Santa Barbara (UCSB class of 2024) majoring in Computer Engineering, an aspiring aerospace engineer. DIY nut and absolutely fascinated by all things space. Preferences: Windows and Linux over Mac, Android over iOS, VSCode and vim over emacs, Spotify over Pandora, GitHub over GitLab, etc. Convince me otherwise. :P

Updated on February 15, 2020

Comments

  • ifconfig
    ifconfig about 4 years

    When trying to run Android Studio on my computer, I get the following error:

    The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin) does not point to a valid JVM installation

    I tried to remove the \bin extension on my JAVA_HOME environment variable, but it gives me the following error:

    No JVM 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

    • My System: Windows 8.1 Update 1 x64 (64 bit)
    • Java Directory: C:\Program Files (x86)\Java\jdk1.7.0_51\bin
  • prakhar19
    prakhar19 about 10 years
    Whats your JDK installation directory.
  • ifconfig
    ifconfig about 10 years
    Should I reboot, if not, the suggestion did not work. I will anyways.
  • prakhar19
    prakhar19 about 10 years
    Can you tell me your JDK installation directory.
  • ifconfig
    ifconfig about 10 years
    Sure... C:\Program Files (x86)\Java\jdk1.7.0_51\bin
  • prakhar19
    prakhar19 about 10 years
    Does your bin folder has the jvisualvm.exe the file.
  • ifconfig
    ifconfig about 10 years
    Yes, my java bin folder does have that executable.
  • prakhar19
    prakhar19 about 10 years
    Oh, I just noticed that your Program files name is "Program Files(x86)", so you should check again whether your windows is 64-bit or 86-bit and then check the JDK for the same. If both match, then I think you have no choice other than reinstalling the Android SDK and the Java JDK.
  • ifconfig
    ifconfig about 10 years
    Ok, so they are the same, so I have to install both again, and in what order? JDK first?
  • prakhar19
    prakhar19 about 10 years
    Sorry, I mistyped, I meant if they don't match. But, then also you may try reinstalling that must fix your problem (90% chance).
  • ifconfig
    ifconfig about 10 years
    Should the Android Studio install to Program Files or Program Files (x86)?
  • prakhar19
    prakhar19 about 10 years
    Leave the installation directory to default.
  • ifconfig
    ifconfig about 10 years
    Ok, Same error (The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin)) does not point to a valid JVM instalation). What should I do?
  • prakhar19
    prakhar19 about 10 years
    I can give you a last advice of checking your JDK by opening the jvisualvm.exe or installing a program like BlueJ to check whether your JDK is corrupt or not.
  • ifconfig
    ifconfig about 10 years
    jvisualvm.exe works otherwise, I'm not sure. Problem Still unsolved
  • Muzaffer
    Muzaffer over 9 years
    @edthethird, you are wrong. I installed only java8. However I'm compiling android project with java7. Android supoorts java7 except try-catch resources.
  • edthethird
    edthethird over 9 years
    yeah, they added support for java 7 many months ago, this answer is outdated.
  • NightKnight on Cloudinsidr.com
    NightKnight on Cloudinsidr.com about 9 years
    This is not a solution. The time does not stand still. Oracle doesn´t develop bug fixes for older versions.
  • edthethird
    edthethird about 9 years
    they also added support for java7 since I made this post. At the time, you could only use java6
  • Saad Bilal
    Saad Bilal over 8 years
    Yes this is one hack.
  • Dmitry Sidorenko
    Dmitry Sidorenko about 8 years
    This was driving me crazy. 32 bit version works with and without quotes, 64 bit works only without.
  • ifconfig
    ifconfig over 6 years
    The fact that my installation was in Program Files, no x86 proves I have 64 bit Java.