Android Studio - 平台和插件更新 & Java @ OSX
Android Studio - Platform and Plugin Updates & Java @ OSX
当我启动 Android Studio 2.0 时,我收到以下消息:
Platform and Plugin Updates
We wanted your IDE to receive upgrades over a secure connection.
Unfortunately, this doesn't work on Java 6, so the option was
disabled. You can enabled it again in settings after upgrading the
JRE.
- 通过
System Preferences
-> Java
= Java 8 Update 77
- 通过
bash
-> java -version
= java version "1.7.0_71"
- 通过
Android Studio 2.0
-> Help
->About
= Java 6
我该如何解决手头的问题?
你可以打开Finder找到Android Studio.App ->显示内容-> Info.list
编辑"JVMOptions"->JVM 版本->1.7+,1.8+
JRE 与 SDK 不同,因此 OS X 您可以通过 plist 或终端解决问题。
按住 Ctrl 并单击 Android Studio 应用程序并 select 显示包内容。使用 TextEdit 或您选择的编辑器打开 Info.plist。向下滚动到底部或使用 cmd-f 找到这个键。确保它看起来像这样。
<key>JVMVersion</key>
<string>1.7*,1.8+</string>
您可以将其更改为 <string>1.7,1.8+</string>
,这将使 Android Studio 默认使用 JRE 1.8,但在 Android Studio 中该版本存在一些拖放问题,因此最好等待并保持在 <string>1.7*,1.8+</string>
.
您也可以在终端中解决这个问题。
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk
你这里指的是IDEJDK。 http://tools.android.com/tech-docs/configuration/osx-jdk 上的指导说明如下:
On Mac OSX, the version of Java used to run the IDE is generally chosen for you automatically, and the choice is based on an entry in the Info.plist file in the IDE installation. Please note: Do not edit Info.plist to pick a different version. That will break not only the application signature, but also future patch updates to your installation. Instead, you can pick a different JDK by setting the $STUDIO_JDK environment variable, as described in the IDE Configuration document.
网站接着说:
On Mac OSX, the default version we are using to run the IDE (not to compile your code) is Java 6. This is primarily because the font rendering on Java 6 has full subpixel LCD antialiasing, whereas Java 7 and 8 does not.
如果您想 运行 IDE 使用不同的 JDK,您可以在终端中执行以下操作(更改路径以匹配您已安装的路径):
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk
open /Applications/Android\ Studio.app
当我启动 Android Studio 2.0 时,我收到以下消息:
Platform and Plugin Updates
We wanted your IDE to receive upgrades over a secure connection. Unfortunately, this doesn't work on Java 6, so the option was disabled. You can enabled it again in settings after upgrading the JRE.
- 通过
System Preferences
->Java
=Java 8 Update 77
- 通过
bash
->java -version
=java version "1.7.0_71"
- 通过
Android Studio 2.0
->Help
->About
=Java 6
我该如何解决手头的问题?
你可以打开Finder找到Android Studio.App ->显示内容-> Info.list
编辑"JVMOptions"->JVM 版本->1.7+,1.8+
JRE 与 SDK 不同,因此 OS X 您可以通过 plist 或终端解决问题。
按住 Ctrl 并单击 Android Studio 应用程序并 select 显示包内容。使用 TextEdit 或您选择的编辑器打开 Info.plist。向下滚动到底部或使用 cmd-f 找到这个键。确保它看起来像这样。
<key>JVMVersion</key>
<string>1.7*,1.8+</string>
您可以将其更改为 <string>1.7,1.8+</string>
,这将使 Android Studio 默认使用 JRE 1.8,但在 Android Studio 中该版本存在一些拖放问题,因此最好等待并保持在 <string>1.7*,1.8+</string>
.
您也可以在终端中解决这个问题。
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk
你这里指的是IDEJDK。 http://tools.android.com/tech-docs/configuration/osx-jdk 上的指导说明如下:
On Mac OSX, the version of Java used to run the IDE is generally chosen for you automatically, and the choice is based on an entry in the Info.plist file in the IDE installation. Please note: Do not edit Info.plist to pick a different version. That will break not only the application signature, but also future patch updates to your installation. Instead, you can pick a different JDK by setting the $STUDIO_JDK environment variable, as described in the IDE Configuration document.
网站接着说:
On Mac OSX, the default version we are using to run the IDE (not to compile your code) is Java 6. This is primarily because the font rendering on Java 6 has full subpixel LCD antialiasing, whereas Java 7 and 8 does not.
如果您想 运行 IDE 使用不同的 JDK,您可以在终端中执行以下操作(更改路径以匹配您已安装的路径):
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk
open /Applications/Android\ Studio.app