Android Studio - JAVA_HOME doesn't point to a valid JVM installation

82,066

Solution 1

You can try this Android Studio error: "Environment variable does not point to a valid JVM instalation"

this works for me. 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 2

As you told you have 64 bit system then copy this path C:\Program Files\Java\jdk1.8.0_31

Step 1 :- Create JAVA_HOME variable by clicking new and past ( C:\Program Files\Java\jdk1.8.0_31) this path.

Step 2 Then click path variable and edit then past it your path after add semicolon (;) C:\Program Files\Java\jdk1.8.0_31

enter image description here

I am using windows 10 so this windows look like this

enter image description here

Note :- If above dialog not open then , select path variable and click on Edit…. Locate the end of the current variable value append the path of jdk, using a semicolon And click ok

Solution 3

To fix it, just remove "\bin" from my JAVA_HOME variable.

NOTE: 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 4

If you are sure that the variable is pointing to the right place, then:

Acess "C:\Program Files\Android\Android Studio\bin"

Choice the .exe for your machine.

enter image description here

Solution 5

Faced same problem for many weeks. What worked for me: uninstalled all java from laptop then installed jdk 7 64 bit, deleted JAVA_HOME and added JDK_HOME.

Share:
82,066

Related videos on Youtube

oneshotfinch
Author by

oneshotfinch

Updated on September 24, 2022

Comments

  • oneshotfinch
    oneshotfinch over 1 year

    Having trouble firing up android studio. Get the following message: The environment variable JAVA_HOME (with the value of ?C:\Program Files\Java\jdk1.8.0_31) does not point to a valid JVM installation. The problem is that as far as I can tell, the environment variable I set up IS pointing to a valid install.

    I've tried everything from renaming it to JDK_HOME, to pointing it to all the sub directories in the jdk folder, to uninstalling and reinstalling java and android studio about 3 time. I have triple checked that I have 64 bit JAVA installed (and that my computer is 64 bit). Pretty much at the end of my rope here. Help would be appreciated big time.

    Here's a screen cap of my windows, you might spot something obvious I haven't:

    a screen cap of my windows

    • Sanjay Hirani
      Sanjay Hirani about 9 years
      Look into the link below you have to change your jdk location in studio [1]: stackoverflow.com/a/20033812/4384828
    • Claudio Redi
      Claudio Redi about 9 years
      if you go to File -> Other Setttings -> Default Project Structure ... what do you see on JDK installation?
    • Alist3r
      Alist3r about 9 years
      You have %JAVA_HOME%\bin in the "Path" variable?? Have you tryed with java 7??
    • oneshotfinch
      oneshotfinch about 9 years
      @Sanjay I've looked through that thread a couple of times now and I don't know what you're referring to. The jdk is in the right place because it's 64 bit. When you say I have to change it in Studio do you mean I have to edit Android Studio files?
    • Sanjay Hirani
      Sanjay Hirani about 9 years
      have you tried user3232025 answer?
    • oneshotfinch
      oneshotfinch about 9 years
      @ClaudioRedi Are you talking about Adnroid Studio? I can't launch it in the first place, I just get a window with the error message above.
    • oneshotfinch
      oneshotfinch about 9 years
      @Sanjay This is weird... I can only see three answers, one from hichris123, one from Rahul Gupta and one from ejmin. Can't even find a user3232025 in any of the comments. Could you copy/paste what they said? EDIT: Just noticed he posted in this thread, whoops! Will try it now.
  • oneshotfinch
    oneshotfinch about 9 years
    I have both variables set to C:\Program Files\Java\jdk1.8.0_31
  • Maarten Bodewes
    Maarten Bodewes about 9 years
    I think you are trying to say that the correct path(e.g. %JAVA_HOME%\bin) containing the Java executable (e.g. java.exe) should be in the PATH environment variable as well, but the answer is quite unreadable right now.
  • Anfaje
    Anfaje about 9 years
    Maybe try installing an older version of java. The brand new ones are not always compatible with the developer environment.
  • shade4159
    shade4159 over 8 years
    Make sure you don't actually type the quotation marks. Once I removed those, mine worked fine (win7x64).
  • Arpit Patel
    Arpit Patel over 7 years
    your wc happy to hear that
  • Chirag Jain
    Chirag Jain almost 7 years
    Thanks bro, I was adding semicolon in place of backslash as a value of JAVA_HOME
  • Akhilesh Dhar Dubey
    Akhilesh Dhar Dubey about 3 years
    You are correct, wasted 30 minutes searching why it not working and it worked when tryied studio64.exe. - thanks.