我无法在Mac OS上启动我的Android Studio进行Android开发(10.10.1 - Yosemite)
当前回答
编辑android工作室的信息。plist文件,以便它使用1.7或任何您已经安装的JVMVersion。将JVMVersion更改为1.6+而不是如上所述的hassternet回答的1.6*应该也可以工作。
上述工作,但不建议参阅RC3发行说明
As of RC 3, we have a better mechanism for customizing properties for the launchers on all three platforms. You should not edit any files in the IDE installation directory. Instead, you can customize the attributes by creating your own .properties or .vmoptions files in the following directories. (This has been possible on some platforms before, but it required you to copy and change the entire contents of the files. With the latest changes these properties are now additive instead such that you can set just the attributes you care about, and the rest will use the defaults from the IDE installation).
Android Studio无法在Mac OSX上加载JVM (Mavericks)
其他回答
尝试从Apple Support Page: http://support.apple.com/kb/DL1572下载Java,如果这对你来说不起作用或无法加载(非常常见的问题),只需按照这个链接下载并安装你需要的Java版本:
http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-001.dmg
就是这样。
在Mac OS X Yosemite上只需安装:
Java SE开发工具包8
and
Java Version 8 Update 25
都是,为我工作!
编辑android工作室的信息。plist文件,以便它使用1.7或任何您已经安装的JVMVersion。将JVMVersion更改为1.6+而不是如上所述的hassternet回答的1.6*应该也可以工作。
上述工作,但不建议参阅RC3发行说明
As of RC 3, we have a better mechanism for customizing properties for the launchers on all three platforms. You should not edit any files in the IDE installation directory. Instead, you can customize the attributes by creating your own .properties or .vmoptions files in the following directories. (This has been possible on some platforms before, but it required you to copy and change the entire contents of the files. With the latest changes these properties are now additive instead such that you can set just the attributes you care about, and the rest will use the defaults from the IDE installation).
Android Studio无法在Mac OSX上加载JVM (Mavericks)
在Android工具项目网站上,有一个很好的解释Mac OSX JDK选择。它解决了我的问题。总而言之:
Android Studio需要两个不同的jdk: IDE本身使用的Java版本。 它用来获取Java编译器的JDK版本 这两者可以(而且通常是)相同,但是您可以进行配置 他们单独。尤其是在OSX上,它们经常是这样的 不同。
Yosemite (Mac OSX 10.10)
首先,请确保您拥有最新版本的Java 6 安装;在某些情况下,这已经解决了问题: http://support.apple.com/kb/DL1572 如果不是,请尝试运行最新版本的Java 7或Java 8 如上所述设置STUDIO_JDK。据报道,这个问题已经解决 其他问题(尽管您将得到字体渲染显示 Java 8以上。)
正如@Gerard的建议,我总结了我的原始评论(https://stackoverflow.com/a/27370525/763459)作为答案,希望它能帮助其他被这个问题困扰的人。
有一种不运行AppleScript的方法: 编辑.bash_profile(如果这个文件不存在,请创建一个新的文件,就像@Gerard建议的那样,你可以第一次使用源文件.bash_profile)。
安装遗留Java(可能需要)http://support.apple.com/kb/DL1572 输入export STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk 然后退出终端(或任何你用来编辑这个文件的文本编辑器),运行Android Studio和viola
在OSX 10.10和Android 1.0.1上测试
推荐文章
- 如何在Java中打印二叉树图?
- 按钮背景是透明的
- String.format()在Java中格式化双重格式
- 在Mac OS X上哪里安装Android SDK ?
- 我如何获得图像缩放功能?
- 在Android应用程序中显示当前时间和日期
- com.jcraft.jsch.JSchException: UnknownHostKey
- Java中的操作符重载
- 如何加速gwt编译器?
- 在Hibernate中重新连接分离对象的正确方法是什么?
- 应该……接住环内还是环外?
- BottomSheetDialogFragment的圆角
- 在应用程序启动时出现“无法获得BatchedBridge,请确保您的bundle被正确打包”的错误
- Mac/OS X上的/var/lib/docker在哪里
- 我如何改变默认对话框按钮的文本颜色在安卓5