Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Android Studio, does not point to a valid JVM installation error

I just downloaded the Android Studio. While trying to run it, I had to modify the environment variable and add

JAVA_HOME

and

C:\Progra~2\Java\jdk1.6.0_22

Once I finished that hurdle, now I am receiving another error:

The environment variable JAVA_HOME (with the value of *C:\Progra~2\Java\jdk1.6.0_22*) does not point to a valid JVM installation. 

I looked through other similar questions and I was asked to check the version, so I did the following in CMD:

C:\Users\Andre>java -version java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)  C:\Users\Andre>javac -version javac 1.6.0_22 

From the results it seems like I have JVM.

I also tried these paths for JAVA_HOME, I closed and reopened a new CMD window each time

C:\Program Files (x86)\Java\jre7 C:\Program Files (x86)\Java\jre6 C:\Program Files (x86)\Java\jdk1.6.0_22 C:\Program Files (x86)\Java\jre7\bin C:\Program Files (x86)\Java\jre6\bin C:\Program Files (x86)\Java\jdk1.6.0_22\bin 
like image 477
LegionDev Avatar asked Jan 14 '14 16:01

LegionDev


People also ask

What does not point to a valid JVM?

The environment variable JAVA_HOME does not point to a valid JVM installation. JAVA_HOME should be set to the root of your Java installation. or add this value to the system environment variables. See What are PATH and other environment variables, and how can I set or use them? for more information.

Is JVM required for Android studio?

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.


2 Answers

Point your JAVA_HOME variable to C:\Program Files\Java\jdk1.8.0_xx\ where "xx" is the update number (make sure this matches your actual directory name). Do not include bin\javaw.exe in the pathname.

NOTE: You can access the Environment Variables GUI from the CLI by entering rundll32 sysdm.cpl,EditEnvironmentVariables. 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.

like image 69
Edwin Mokami Avatar answered Sep 21 '22 15:09

Edwin Mokami


It is absolutely possible that all other answers work for people but for me this path worked:

Leave your JDK path under JAVA_HOME System Variable as it is given here. Do not append bin or another path. It worked for me.

C:\Program Files\Java\jdk1.8.0_11\ 

Otherwise I am getting this error:

Installing Android Studio, does not point to a valid JVM installation error 
like image 22
Master Avatar answered Sep 22 '22 15:09

Master