I downloaded Android Studio and attempted to launch the program.
This is running on Windows 7 64-bit with Java 1.7. During the installation my Java 1.7 is detected,
I've tried so many of the answers here but none of them works, so I decided to mix some of the answers here and I am successful!

Step 1: Go to the system properties by right-clicking on My Computer or by pressing windows button on typing This PC and right clicking on it and selecting Properties.

Step 2: Click the advanced system settings or Environment Variables
Step 3: Take note that there are 2 different variable. What you need to create is system variables not user variables, when you clicked new type the following
Variable name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.8.0_25\ (Note: Please check if the path is right, sometimes it is C:\Program Files (x86)\Java\jdk1.8.0_25)
Step 4: Run the android studio, no need to restart.
Note:
*C:\Program Files\Java\jdk1.8.0_25\ depends entirely on the installation path of your JDK not JRE so don't be confused if you see something like the picture below. Just enter the location of your jdk, in my case it is C:\Program Files\Java\jdk1.8.0_25\.
*Do not include the bin folder when you enter the Variable value.


Edit: For Windows 8 and 10 Users: Try to run C:\Program Files\Android\Android Studio\bin\studio.exe instead of C:\Program Files\Android\Android Studio\binstudio64.exe