Sang
Sang

Reputation: 4446

MacOS Cannot start android studio, java update required

Android Studio on my Mac can not start.

A Java Update dialog is shown when I open the Android Studio app. The dialog's content is:

Java version: 1.6.0_51-b11-457 which is installed on your Mac is obsolete. Would you like to update Java?

I pressed the update button, the Java Update dialog disappeared, but nothing happens after that.

When I run command java -version on terminal. The result is:

java version "1.8.0_92" Java(TM) SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

I had installed java via brew cask install java and Android Studio via brew cask install android-studio

My MacOS version is: OS X El Capitan 10.11.5

The Android Studio version is 2.1.1.0,143.2821654 as I look at homebrew cask's installation folder /opt/homebrew-cask/Caskroom/android-studio/2.1.1.0,143.2821654/'s name

This problem has already token takes me hours of googling, but there is still no way to continue. Finally, I decided to go to StackOverflow :(.

Could anyone tell me how should I do to use Android Studio?

Many thanks,

Upvotes: 2

Views: 1288

Answers (1)

Sang
Sang

Reputation: 4446

Follow this question, when the Java Update dialog shows, right click to its icon under docker bar > Options > Show in finder

Open package content of Android Studio.app to edit info.plist. Change JVMOptions->JVMVersion from 1.6*,1.7+ to 1.6+,1.7+.

Now it works

Upvotes: 2

Related Questions