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 /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/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:
<key>JVMVersion</key> <string>1.6*</string> change it to <key>JVMVersion</key> <string>1.8*</string>
If you have JDK_1.7.0* you should use 1.7*. That's it, happy coding!
No comments:
Post a Comment