I just downloaded the Android Studio. While trying to run it, I had to modify the environment variable and add
JAVA_HOME
and
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.