5

When I start Android Studio 2.0 and I'm getting following message:

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.

  • via System Preferences -> Java = Java 8 Update 77
  • via bash -> java -version = java version "1.7.0_71"
  • via Android Studio 2.0 -> Help->About = Java 6

How do I address issue at hand?

alexus
  • 7,256
  • 12
  • 44
  • 66

3 Answers3

4

you can open Finder to find Android Studio.App ->Show Contents-> Info.list

edit "JVMOptions"->JVMVersion->1.7+,1.8+

mapleslong
  • 41
  • 1
2

The JRE is different than the SDK so on OS X you can fix the issue via plist or Terminal.

ctrl-click the Android Studio app and select Show Package Contents. Open Info.plist with TextEdit or editor of your choice. Scroll down towards the bottom or use cmd-f to find this key. Make sure it looks like this.

<key>JVMVersion</key>
<string>1.7*,1.8+</string>

You could change it to <string>1.7,1.8+</string> which will make Android Studio default to using JRE 1.8 but there are some drag and drop issues with that version in Android Studio so it's best to wait and just keep it at <string>1.7*,1.8+</string>.

You can also fix this issue in Terminal.

export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk

Edison
  • 11,881
  • 5
  • 42
  • 50
2

What you're referring to here is the IDE JDK. The guidance on http://tools.android.com/tech-docs/configuration/osx-jdk says the following:

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.

The site goes on to say:

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.

If you want to run the IDE using a different JDK, you can do the following in the Terminal (changing the path to match what you have installed):

export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk
open /Applications/Android\ Studio.app
Daniel Kurtz
  • 76
  • 1
  • 7