Search code examples
androidjava-home

Android Studio JAVA_HOME variable not working on Windows 8


I just installed Android Studio, and it asked me to set up my JAVA_HOME variable. I set it to "C:\Program Files (x86)\Java\jdk1.8.0_20" my PATH variable is set to "C:\Program Files (x86)\Java\jdk1.8.0_20\bin" and when I type "java -version" in my command line I get "java version 1.8.0_20" so I know my JDK is working. When I type "echo %JAVA_HOME%" in the command line I get "C:\Program Files (x86)\Java\jdk1.8.0_20" and when I type "echo %PATH%" I get "C:\Program Files (x86)\Java\jdk1.8.0_20\bin" so I know those are working. When I attempt to start Android Studio I get an error message that reads "No JVM installation found. Please install a 64 bit JDK." If I change my JAVA_HOME variable to include the \bin I get an error saying the JAVA_HOME does not point to a valid installation of JDK. I have looked all over the internet, and I have done everything exactly as every source I have found says to do it. If anyone knows what I am doing wrong some help would be greatly appreciated.

I'm running windows 8.1 on a surface Pro 2 in case that matters.


Solution

  • Looks like you are using the 32-bit jdk with a 64-bit version of AndroidStudio. You should download and install java for 64-bit computers and you should be fine.