我运行OSX 10.8,并试图运行使用专用的JDK Android的工作室应用程序包,而不是一个是全球的装机量。
编辑:我没有任何Java安装全球访问
我在过去与Eclipse通过编辑plist.info文件,其中说明了JRE / JDK我想通过eclipse.ini文件使用做到了这一点成功。
我还没有发现魔术如何与Android工作室做到这一点。
编辑plist文件失败后,我打开一个终端,并添加了JDK / bin目录到PATH并设置JAVA_HOME但这是不够的idea_applauncher找到一个Java安装,我已经指定。
我不知道还有什么我可以尝试做到这一点。任何想法?
编辑: 我没有足够的代表处发布的截图,但低于该命令行看起来与输出。
当我尝试运行我得到一个弹出窗口,说没有JDK的安装包,它有两个按钮,询问我任何安装或不现在
$ ./idea_appLauncher
没有Java运行时present,要求安装。
解决方案有关OSX另一种解决方案:转到应用程序文件夹,右键单击在Android Studio中,选择显示包内容
打开Info.plist文件。找到JVMVersion键,并设置您需要的字符串值。
在我的情况,我需要的是1.7和最多能运行RoboVM插件,而该值 1.6 * 1.7 + ,所以我把它只有在1.7 +
重新启动Android的工作室,它应该是使用你所需要的JVM版本。
这工作,如果你对你的Mac root权限。
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.