I just downloaded the Android Studio. While trying to run it, I had to modify the environment variable and add
JAVA_HOME
and
<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,
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.
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)
Don't include bin folder while coping the path for Java_home.
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
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.