1

I'm trying to install and use Android studio. I followed their link and downloaded the latest JDK. I have installed jdk1.8.0_92. I also followed the instructions (as far as I know - I'm such a noob I don't know if I did it correctly) to add the JAVA_HOME environment variable.

If I put JAVA_HOME = C:\Program Files\Java\jdk1.8.0_92\bin, as their instructions guide, it works and I can use javac -version in Powershell that tells me I'm running 1.8.0_92.

But when I try to run Android Studio, it tells me "The environment variable JAVA_HOME with the value of C:\Program Files\Java\jdk1.8.0_92\bin does not point to a valid JVM installation."

I found a few related questions here, and experimented with removing the \bin, because it worked for some other people. When I do that, javac -version tells me I do not have Java installed. So that clearly doesn't work for me.

As per another question (Android Studio error: "Environment variable does not point to a valid JVM installation"), I also tried adding the C:\Program Files\Java\jdk1.8.0_92\bin to a JDK_HOME variable in addition to JAVA_HOME, but that didn't seem to change anything. For good measure, I then tried adding it to PATH as well, which also didn't help.

I'm not sure what else to do at this point. If it's NOT an environment variable problem, does that mean I don't have a JVM installation? Is that a separate thing from the SDK that Android Studio's instructions told me to download? I didn't see any separate JVM files or I would have tried that too.

I have uninstalled and reinstalled several different versions of the JDK, and it's clear x86 won't work with Android studio AT ALL for me. So I'm back to x64, which is what Android Studio asks for.

I'm on Windows 10, if that matters.

Thanks in advance...

EDITED BECAUSE I SORT OF FOUND A WORKAROUND

I figured it out, sort of. This question (Android Studio error: "Environment variable does not point to a valid JVM installation") had an answer in it about JDK_HOME which seemed to do the trick for me. It did NOT work with jdk 8, but DID work in jdk 7. I have no idea what I'm going to do when I eventually need to upgrade, but I guess it works for now.

Community
  • 1
  • 1
Oxymoronica
  • 111
  • 2
  • 4
  • 10

1 Answers1

1

Don't point JAVA_HOME to bin directory. Point it to the directory which has bin.

Change

JAVA_HOME = C:\Program Files\Java\jdk1.8.0_92\bin

to

JAVA_HOME = C:\Program Files\Java\jdk1.8.0_92

See this for more information

Rohit5k2
  • 17,948
  • 8
  • 45
  • 57
  • That's one of the things I tried first. That causes it to tell me I don't have Java installed at all. – Oxymoronica Jun 02 '16 at 21:20
  • Try with jdk 7, jdk 8 creates issues sometimes. – Rohit5k2 Jun 02 '16 at 21:35
  • Just tried jdk 7. Same exact problem. With \bin, I can load the version number to tell it works, but Android Studio tells me there is no valid JVM installation. Without \bin I can't load the version number and it thinks Java isn't installed. – Oxymoronica Jun 02 '16 at 22:04
  • 1
    I figured it out, sort of. This question (http://stackoverflow.com/questions/23185358/android-studio-error-environment-variable-does-not-point-to-a-valid-jvm-instal?lq=1) had an answer in it about JDK_HOME which seemed to do the trick for me. It did NOT work with jdk 8, but did work in jdk 7. Thank you for the suggestion to switch versions! – Oxymoronica Jun 02 '16 at 22:10