Android Studio error: "Environment variable does not point to a valid JVM installation"
Solution 1
Do step by step as shown in this YouTube Video
Go to: System -> Advanced system settings -> Environment Variables
Add a new variable to you profile NAME=JAVA_HOME
STRING: Program Files/java/"your string"
Save and Start Android Studio ;)
Solution 2
If you start 64bit Android Studio, you have to add JAVA_HOME as
"C:\Program Files\Java\jdk..."
If 32bit
"C:\Program Files(x86)\Java\jdk..."
and dont put "\bin" end of the path.
Solution 3
All you need to do is, set the JAVA_HOME and JDK_HOME environment variables by following the steps:
1)Right click on
My Computer.->>Properties->>Advanced System Settings.->>Environment Variables
.
2)In user variables for (Your PC name),click on new at botton of the tab.
3)In variable name,type JAVA_HOME
4)In variable value,type
C:\Program Files\Java\jdk1.8.0_25
(path where your jdk folder is located on the system ).
5)Do it again with JDK_HOME
with same path.
Solution 4
Providing both JAVA_HOME and JDK_HOME with identical Path without \bin helped for me! My settings:
- JAVA_HOME
\Program Files\Java\jdk1.8.0_05
- JDK_HOME
%JAVA_HOME%
- PATH
...%JAVA_HOME%\bin
Solution 5
Just dont put "\bin
" end of the path.
JAVA_HOME
should be with value C:\Program Files(x86)\Java\jdk1.7.0_51
Related videos on Youtube
ifconfig
Student at the University of California Santa Barbara (UCSB class of 2024) majoring in Computer Engineering, an aspiring aerospace engineer. DIY nut and absolutely fascinated by all things space. Preferences: Windows and Linux over Mac, Android over iOS, VSCode and vim over emacs, Spotify over Pandora, GitHub over GitLab, etc. Convince me otherwise. :P
Updated on February 15, 2020Comments
-
ifconfig about 4 years
When trying to run Android Studio on my computer, I get the following error:
The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin) does not point to a valid JVM installation
I tried to remove the
\bin
extension on myJAVA_HOME
environment variable, but it gives me the following error:No JVM 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
- My System: Windows 8.1 Update 1 x64 (64 bit)
- Java Directory: C:\Program Files (x86)\Java\jdk1.7.0_51\bin
-
prakhar19 about 10 yearsWhats your JDK installation directory.
-
ifconfig about 10 yearsShould I reboot, if not, the suggestion did not work. I will anyways.
-
prakhar19 about 10 yearsCan you tell me your JDK installation directory.
-
ifconfig about 10 yearsSure... C:\Program Files (x86)\Java\jdk1.7.0_51\bin
-
prakhar19 about 10 yearsDoes your bin folder has the jvisualvm.exe the file.
-
ifconfig about 10 yearsYes, my java bin folder does have that executable.
-
prakhar19 about 10 yearsOh, I just noticed that your Program files name is "Program Files(x86)", so you should check again whether your windows is 64-bit or 86-bit and then check the JDK for the same. If both match, then I think you have no choice other than reinstalling the Android SDK and the Java JDK.
-
ifconfig about 10 yearsOk, so they are the same, so I have to install both again, and in what order? JDK first?
-
prakhar19 about 10 yearsSorry, I mistyped, I meant if they don't match. But, then also you may try reinstalling that must fix your problem (90% chance).
-
ifconfig about 10 yearsShould the Android Studio install to Program Files or Program Files (x86)?
-
prakhar19 about 10 yearsLeave the installation directory to default.
-
ifconfig about 10 yearsOk, Same error (The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin)) does not point to a valid JVM instalation). What should I do?
-
prakhar19 about 10 yearsI can give you a last advice of checking your JDK by opening the jvisualvm.exe or installing a program like BlueJ to check whether your JDK is corrupt or not.
-
ifconfig about 10 yearsjvisualvm.exe works otherwise, I'm not sure. Problem Still unsolved
-
Muzaffer over 9 years@edthethird, you are wrong. I installed only java8. However I'm compiling android project with java7. Android supoorts java7 except try-catch resources.
-
edthethird over 9 yearsyeah, they added support for java 7 many months ago, this answer is outdated.
-
NightKnight on Cloudinsidr.com about 9 yearsThis is not a solution. The time does not stand still. Oracle doesn´t develop bug fixes for older versions.
-
edthethird about 9 yearsthey also added support for java7 since I made this post. At the time, you could only use java6
-
Saad Bilal over 8 yearsYes this is one hack.
-
Dmitry Sidorenko about 8 yearsThis was driving me crazy. 32 bit version works with and without quotes, 64 bit works only without.
-
ifconfig over 6 yearsThe fact that my installation was in
Program Files
, nox86
proves I have 64 bit Java.