简体   繁体   中英

JAVA_HOME Path works for Java but not for Android Studio

THIS QUESTION DOESNT HAVE AN ANSWER, THERE IS NO DAMN BACK BUTTON IN MY CASE!!!

Solution: ITS STILL NOT WORKING IN JDK8, you have to use ordinary Android SDK or Android Studio with JDK7! Thanks to Elliot Frisch's comment.

i hope thats the right metasite for that kind of stuff. i have properly installed java JRE and Java JDK. I can compila and execute java from commandline but if i try to install androi studio i get an error that JAVA_HOME doesnt point to a valid JVM installation.

are there additional things i have to install before using android studio or is the JAVA_HOME path different for android studio?

i put

C:/.../jre.x.x
C:/.../jre.x.x/bin
C:/.../jdk.x.x
C:/.../jdkx.x/bin

to my JAVA_HOME Path.

First, set your JAVA_HOME to only one folder (and it's the parent of bin )

set "JAVA_HOME=C:/.../jdk.x.x"

Add it to your path like

set "PATH=%PATH%;%JAVA_HOME%\bin"

I recommend to see these pages for more information, and always search before asking, I'm sure you can find the answer more quickly.

Android SDK installation doesn't find JDK

Setting JAVA_HOME at Android SDK

in windows just setting JAVA_HOME environment variable to only "C:\\Program Files\\Java\\jdkx.x.x_xx" is enough.

xxx -> relate to your JDK version.

C:\\Program Files\\Java\\ -> depend to your java installation directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM