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

爱⌒轻易说出口 提交于 2019-12-02 15:02:37
Edwin Mokami

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.

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
PK Gupta

Updated android studio to 1.2.1. Even though I was getting the same error. Nothing worked, finally replaced JAVA_HOME with JDK_HOME and it did the magic.

2 suggested solutions

  1. Upgrade JDK to 1.7

  2. Make sure the 32-bit or 64 bit versions match on both sides

Recently I am working with the 1.8.0_25 JDK version on Windows 8.1 and I had the same problem with this. But as PankaJ Jakhar said

The real solution for me was pretty simple:

  1. Add the JAVA_HOME variable to the system ones, not on the user ones.
  2. The path I introduced for this variable was:

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

And it works for me!

In my case, it started hapenning after I updated to Android Studio 1.2. To fix it I just had to remove "\bin" from my JAVA_HOME variable.

1) Just remove \bin from Java_home environmental Variable. This worked for me .
2) Also make sure you are using the correct versions of android studio and Java (32/64 bit)

I had to put backslash at the end of path and it worked for me.

Earlier I was using

C:\Program Files\Java\jdk1.7.0_79

just by putting "\" at the end, worked for me. Now the value of the JAVA_HOME variable is

C:\Program Files\Java\jdk1.7.0_79\

Don't include bin folder while coping the path for Java_home.

I had this problem as well, and I must have tried 20 different path adding solutions before I worked it out. Someone mentioned it above almost as a side note, but this was exactly my issue:

make sure you are running a 64-bit version of java.

My problem was different to any of the above as far as I can tell. I had a working version 1.1 of Android Studio and upgraded to 1.2 Then I got the JAVA_HOME error when starting 1.2

The problem was that my JAVA_HOME was set to "C:\Program Files\Java\jdk1.8.0_20" with quotation marks included. I haven't put them there to quote the string, the quotation marks were in the Variable Value field. It appears that 1.1 is happy with the quotes being there but 1.2 is not.

Removing quotes removed the error and 1.2 now opens fine

Try using the above options But this one worked for me. my JAVA_HOME looked like this C:\Program Files\Java\jdk1.7.0_21;F:\Software\apache-ant-1.9.4-bin\apache-ant-1.9.4\bin Only keeping the JAVA path in the JAVA_HOME Remove any additional path if you had given C:\Program Files\Java\jdk1.7.0_21

i think you are doing every thing fine just remove ";" from the last of java_home variable. every thing will work fine.

Bbbartt

Using c:/Program Files/Java/jre1.8.0_73/ instead of C:/Program Files/Java/jdk1.8.0_73 as JAVA_HOME variable solved the problem for me. Android studio now launches without problems.

AnR

I am using 64-bit Windows. After battling with various settings I followed these steps:

  • Thru Add/Remove Programs I uninstalled all Java(s)
  • Removed JAVA_HOME variable from environment
  • Removed Java folder reference from PATH environment variable
  • Downloaded and installed 64-bit Java SDK
  • Added JAVA_HOME variable in system variables and assigned it the value C:\Program Files\Java\jdk1.8.0_31

In the last step please note that its the parent Folder and not the \bin sub-folder. It started working.

Follow @abs solution

If you still continue to get the error even after setting the JAVA_HOME variable Copy the studio folder to your C drive and then run the studio.exe or studio64.exe depending upon your java versio

In my case it was because of an invisible character at the beginning of the path:

Most probably the issue happens because of the incompatability of 32 bit and 64 bit excecutables. Suppose if you have installed 32 bit Android Studio by mistake and you will be downloading a 64 bit JDK. In this case 32 bit Android Studio will not be able to pick up the 64 bit JDK. This was the issue I faced. So I followed the below simple steps to make it working,

  1. Downloaded 32 bit JDK(you can also download 64 bit Android Studio if you do not want to change the 64 bit JDK)
  2. Right click MyComputer > Advanced System Settings > under 'Advanced tab' > Environment variables > Under System Variables > Add JAVA_HOME as key and your jdk(eg:C:\Program Files (x86)\Java\jdk1.7.0_79) location as value.
  3. Save it and launch Android Studio. You are good to go now.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!