I'm running OSX 10.8 and was trying to run the Android Studio app bundle using a private jdk rather than one that is globally installed.
EDIT: I don't have any java installation globally accessible.
I have done this successfully in the past with Eclipse by editing the plist.info file and specifying what JRE/JDK I want to use via the eclipse.ini file.
I haven't found the magic on how to do this with Android Studio.
After editing the plist file unsuccessfully I opened a terminal and added the JDK/bin directory to the PATH and set a JAVA_HOME but that wasn't enough for the idea_applauncher to find a Java installation where I had specified.
I'm not sure what else I could try to make this happen. Any ideas?
EDIT: I don't have enough rep to post a screenshot, but below that what the command-line looks like with the output.
When I try to run the bundle I get a pop-up window saying there's no JDK installed and it has two buttons asking me to either "Install" or "Not Now"
$ ./idea_appLauncher
No Java runtime present, requesting install.
Another solution for OSX: go to the Applications folder, right click on Android Studio, choose "Show Package Contents".
Open the Info.plist file. Locate the JVMVersion key, and set the string value you need.
In my case, I needed to be 1.7 and up to be able to run the RoboVM plugin, and the value was 1.6*,1.7+, so I left it only on 1.7+.
Restart Android Studio and it should be using the version of the JVM you need.
This works if you have root access on your Mac.
$ export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk
$ open /Applications/Android\ Studio.app
here is explain link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With