Tuesday, September 16, 2014

Android Studio - Set JVM Version in Mac OSX 10.7+

I downloaded Android Studio 0.8.9 Build 123.1404660 into my Mac OSX 10.9. After install it into "Appliations", try to start and I got a "To open Android Studio, you need a JAVA SE 6 runtime. Would you like to install one now"? I do have JDK_1.8.0 installed on my Mac.

First I thought it was the "JAVA_HOME" parameter unset. So I set "JAVA_HOME" in my .bash_profile:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
$ echo $JAVA_HOME

But when I try to load "Android Studio" again, the same error showed up.

Turns out you have to edit the Android Studio's info.plist file in the package so it uses 1.8.

Go to "Applications" -> "Android Studio" -> "Contents" -> "Info.plist", find the line:

change it to 


If you have JDK_1.7.0* you should use 1.7*. That's it, happy coding!

No comments: