Cannot start Android Studio on Yosemite

Cannot install Java 7 (the installer refuses).

You can install Java 8.

But then, starting with Android Studio, he says that he needs to install the obsolete JDK 6, which will not work for me, because our projects are already 1.7.

+47
android android-studio osx-yosemite
Jun 09 '14 at 16:48
source share
10 answers

Now we have an official page that describes what to do: http://tools.android.com/tech-docs/configuration/osx-jdk

Please do not modify Info.plist; which has many shortcomings (including broken fixes and cracked application signatures, etc.). Starting with Android Studio 1.0, we have another way to install the JDK to use the IDE.

+16
Dec 09 '14 at 20:37
source share

UPDATE 2014.12.10

This should be the latest update on this.

After the final version of Android Studio v1.0, there is an official way to select your JVM, mentioned here:

http://tools.android.com/tech-docs/configuration/osx-jdk

All the following information is stored only as a link, please do not use it.

UPDATE 2014.11.26

Editing the Info.plist file as suggested in this answer may break your IDE .
Please check out the prescribed solution mentioned by IntelliJ people and this is the preferred solution to this problem.

If any of the incorrect or unwanted effects mentioned there occurs with your installation using this fix, you should restore the plist file and use the outdated JDK 6 instead.

If JDK 6 is not an option for your installation or still has some difficulties when starting the IDE, you can try this fix at your own risk.

Please also read the comments in this answer to view reviews of other community members (yes, good and bad) and my discussions with them.

AFTER UPDATE

This is an outdated answer when Yosemite is at an early stage of Beta and can ruin your current setup (see comments mainly caused by incompatible JVMs when you need to update / update them).

As mentioned in the original answer, this is a dirty fix of the time, and the most suitable way to fix this problem now is to update / update your JVMs, as suggested for your OSX system ,

The original answer is provided below for reference only, if all the JVM updates / updates still do not work for you, at least you can manually install the JVM and use this hack, but please do not raise this answer because there are better ones .

====================================

As mentioned by other users, Apple's JDK and the new OSX seem messy.

However, there is a dirty quick fix for this.

First, find your Android studio, for my car, it is here:

 jerry-retina-mbp:Android Studio.app jerry$ pwd /Applications/Android Studio.app 

Then find the application description file for it called "Info.plist":

 jerry-retina-mbp:Android Studio.app jerry$ ls Contents/Info.plist Contents/Info.plist 

Use "Finder" to open this folder:

 jerry-retina-mbp:Android Studio.app jerry$ open Contents 

Then you can use any text editor you like to change the JVM settings in "Info.plist" (which is just an XML file).

Before:

   <key> JVMVersion </key>
   <string> 1.6 * </string>

After:

   <key> JVMVersion </key>
   <string> 1.6+ </string>

Hopefully after this change your Android studio will no longer complain about the JVM.

+114
Jun 20 '14 at 8:05
source share

If you click "more ..." in the error dialog box, this will result in Java for OS X 2014-001 . Just download and install it.

+41
Jun 10 '14 at 12:33
source share

I followed the highest voice response in the final retail version of Yosemite with android studio 0.8.9, and this caused a lot of problems. My setup with multiple monitors did not work, and the android studio accidentally crashed or locked up.

Instead, installing the java update worked for me: http://support.apple.com/kb/DL1572

InteliJ does not recommend editing the plist file to run the IDE with a higher version of java. He will break the update system. In addition, there are many errors that will appear when working in higher versions of java: https://intellij-support.jetbrains.com/entries/27854363-IDE-doesn-t-start-after-updating-to-Mac-OS -Yosemite-or-Mavericks

+13
Oct. 20 '14 at 1:15
source share

I had the same problem and fixed the javaforosx installation. http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US .;)

+2
Oct 18 '14 at 21:15
source share

Open a terminal and run

 java -version 

If it shows javac 1.8.* , Then

 <key>JVMVersion</key> <string>1.8*</string> 

otherwise ( javac 1.7.* ), then

 <key>JVMVersion</key> <string>1.7*</string> 

If there is no mapping at all, you should install the Java SDK.

+1
Oct 19 '14 at 1:58
source share

I tried several solutions, loading several sdk, but Android Studio did not recognize them as valid sdks.

Finally, the workaround that worked for me was:

  • Delete the settings for Android Studio.app and Android Studio (~ / Library / Preferences / AndroidStudio).
  • Rename / usr / libexec / java _home to java_home.bak.
  • Install Android Studio again.
  • When Android Studio requests a valid Java SDK, follow the link provided by Android Studio and download this java installation.
  • After installation, click the discovery button on Android Studio and run.
+1
Feb 12 '15 at 17:26
source share

To make it all work:

  • old jdk installed
  • JDK 8 installed

I found a thread that Oracle is going to update 1.7 so that the installer does not slow down at 10.10, but it has not happened yet.

It finished the job. Obviously, the application uses 8, since my language level in my project is 1.7, and the inherited JDK is 1.6.

0
Jun 10 '14 at 13:48
source share

for me the solution was:

  • Open the Info.plist file inside the Android Studio.app folder. (context menu of the contents of the context menu)
  • Locate the JVMVersion key and replace the line with the next version number 1.8 * .
  • Save

XML Info.plist should look like this:

 <key>JVMVersion</key> <string>1.8*</string> 

It also works on Android Studio 0.9.9

0
Oct 18 '14 at 20:22
source share

Last year, I removed Java 6 from Mavericks and installed Java 7, then installed Android Studio, and everything works fine. I updated Android Studio around August or October, and I had a problem that everyone is facing. Today I uninstalled Java 7 and installed Java 8 and added STUDIO_JDK for Java 8. I uninstalled Android Studio and installed the latest version of Android Studio. Now everything works as expected.

0
Mar 12 '15 at 3:38
source share



All Articles