我无法在Mac OS上启动我的Android Studio进行Android开发(10.10.1 - Yosemite)
当前回答
尝试从Apple Support Page: http://support.apple.com/kb/DL1572下载Java,如果这对你来说不起作用或无法加载(非常常见的问题),只需按照这个链接下载并安装你需要的Java版本:
http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-001.dmg
就是这样。
其他回答
注意,最后一个变量允许你在OSX上运行带有Java 7的Android Studio(通常从Info.plist中指定的版本中选择Java 6):
$ export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk
$ open /Applications/Android\ Studio.app
为我工作
我也在处理同样的问题,而且我成功了。
可能是JDK版本不对。
现在我安装了jdk1.8,现在没问题了。
编辑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)
“在Mac OS上,运行带有Java运行时环境(JRE) 6的Android Studio,以优化字体渲染。然后,您可以配置您的项目使用Java开发工具包(JDK) 6或JDK 7。”
这是在Mac OS X系统要求下的http://developer.android.com/sdk/index.html中列出的。
一旦你按照Alonso C. Licks从苹果安装了Java 6(而不是JDK),你应该能够打开Android Studio并重新配置,而不必在终端中混乱,信息。Plist文件或其他库。
在finder中打开Android Studio的应用程序包,并编辑信息。plist文件。修改密钥JVMversion。用1.6+代替1.6*。这招对我很管用!
编辑:
虽然这在旧版本的Android Studio中是必要的,但不再推荐这样做。详见官方声明
"请注意:不要编辑信息。请选择一个不同的版本。这不仅会破坏应用程序的签名,还会破坏未来的补丁更新。”
安东尼奥•何塞的答案是正确的。
谢谢aried3r !
推荐文章
- 警告:API ' variable . getjavacompile()'已过时,已被' variable . getjavacompileprovider()'取代
- 安装APK时出现错误
- 在流中使用Java 8 foreach循环移动到下一项
- 访问限制:'Application'类型不是API(必需库rt.jar的限制)
- 用Java计算两个日期之间的天数
- 为什么在Mac OS X v10.9 (Mavericks)的终端中apt-get功能不起作用?
- 碎片中的onCreateOptionsMenu
- 如何配置slf4j-simple
- 在Jar文件中运行类
- 带参数的可运行?
- TextView粗体通过XML文件?
- 如何使线性布局的孩子之间的空间?
- 我如何得到一个字符串的前n个字符而不检查大小或出界?
- 我可以在Java中设置enum起始值吗?
- Java中的回调函数