I kept having issues launching android studio because it kept giving me an error that said “Android Studio was unable to find a JVM”. I knew that I had Java installed correctly, but for some reason it would not find it.
Here is the simple fix. There is an environment variable that can be set.
Open terminal and put in:
launchctl setenv STUDIO_JDK /path/to/your/jdk
For me it was:
launchctl setenv STUDIO_JDL /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk