我无法在Mac OS上启动我的Android Studio进行Android开发(10.10.1 - Yosemite)


当前回答

在Mac OS X Yosemite上只需安装:

Java SE开发工具包8

and

Java Version 8 Update 25

这都是我的工作!就像gehev说的,这么简单!

其他回答

作为一个新手用户,我花了一段时间来理解如何以正确的方式修复这个问题。在搜索和低估了许多关于SO的答案后,我想出了以下步骤,你需要遵循来解决这个问题。

请注意:

尽管最简单的解决方案是更新Info。android studio的Plist。但不建议这样做,也不是正确的修复方法。

官方声明-“请注意:不要编辑信息。请选择一个不同的版本。这不仅会破坏应用程序的签名,还会破坏未来的补丁更新。”

第一个解决方案:如果你从命令行运行Android Studio,你可以将这两行添加到你的.bash_profile中

$ export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk

$ open /Applications/Android\ Studio.app

从下次你打开你的终端,你的工作室将自动开始。

第二个解决方案:如果你想从UI(点击图标)运行Android Studio,请遵循以下步骤:

在mac上打开脚本编辑器(可以在spotlight中找到它) 复制到下面一行 执行shell脚本“launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk”

注意:—请根据实际版本修改jdk版本。要检查您使用的是开放终端的哪个版本,请运行以下命令

java -version

3.现在保存(⌘+s)为文件格式:应用程序。最后打开系统设置→用户和组→登录项,添加刚刚创建的新应用程序。

注销和登录再次或您可以手动运行该应用程序以及..

woolaaaa ...对抗自由我们还。

引用:

安东尼奥·何塞的回答

ruario的回答

“在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文件或其他库。

AndroidStudio将从文件~/Library/Preferences/AndroidStudio/idea.properties中读取设置。我创建了这个文件,其中有我的jdk的路径:

STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk

不编辑信息。plist必要!

编辑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 X Yosemite上只需安装:

Java SE开发工具包8

and

Java Version 8 Update 25

都是,为我工作!