I have a JAVA_HOME variable set to:
C:\Program Files (x86)\Java\jdk1.7.0_45\ And the path to the jdk is: C:\Program Files (x86)\Java\jdk1.7.0_45
However when I try to start android studio I get the error:
No JVM installation 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.
The Android Studio make use of JAVA_HOME environment variable to find the JVM installation. If you have not set the JAVA_HOME then you must do so by going into My Computer -> System Properties -> System Settings ->Environment Variables. Make sure your JAVA_HOME points to 64-bit JDK installation e.g. JDK 1.8.
Download Liberica JDK and on installation it will automatically set JAVA_HOME environment variable. Now you just go to Android Studio -> Project Structure -> SDK -> Point all jdk path to liberica jdk installation directory and apply. You are done. Just restart android studio and gradle command will work.
To set JAVA_HOME, do the following: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.
If any program that requires a Java runtime fails to find the JAVA_HOME environment variable upon startup, or if the JAVA_HOME environment variable is misconfigured, it will result in some of the following error messages to be displayed: A Java installation exists but JAVA_HOME has been set incorrectly.
It says that it should be a 64-bit JDK. I have a feeling that you installed (at a previous time) a 32-bit version of Java. The path for all 32-bit applications in Windows 7 and Vista is:
C:\Program Files (x86)\
You were setting the JAVA_HOME
variable to the 32-bit version of Java. Set your JAVA_HOME
variable to the following:
C:\Program Files\Java\jdk1.7.0_45
If that does not work, check that the JDK version is 1.7.0_45. If not, change the JAVA_HOME
variable to (with JAVAVERSION
as the Java version number:
C:\Program Files\Java\jdkJAVAVERSION
Here is the tutorial :- http://javatechig.com/android/installing-android-studio and http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/
Adding a system variable JDK_HOME with value c:\Program Files\Java\jdk1.7.0_21\ worked for me. The latest Java release can be downloaded here. Additionally, make sure the variable JAVA_HOME is also set with the above location.
Please note that the above location is my java location. Please post your location in the path
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With