15

Both Android Studio and Eclipse are asking me to install JDK 6 even though JDK 8 is already installed. Several workarounds online told me change the java_home to point the JDK 8 installation location, done that such that both /usr/libexec/java_home and java -version commands refer to the JDK 8 installation but Android Studio and Eclipse still asking me to install JDK 6. Anyone solved this issue.

rnxfod
  • 907
  • 2
  • 8
  • 14

2 Answers2

23

Android Studio is based on Intellij Idea 13. The solution here also applies. Just modifying Info.plist from 1.6* to 1.7* did it for me.

Btw, I've observed that at least Android Studio 0.5.5 uses massive amounts of memory. With Java 8 it gets over 2GB for very simple projects. With Java 7 it is still bad, but takes around 1.5GB.

user1906
  • 2,310
  • 2
  • 20
  • 37
  • thanks very much. been trying all kinds of workarounds all week. had to reinstall mavericks at one point because i'd messed up the jdk installation files so bad. thanks again. – rnxfod Apr 25 '14 at 13:35
  • @user1906 so taking into account that it uses massive amounts of memory with Java 7 and 8, would you recommend to switch to Jdk6 for speed? – Dimitry K Jul 05 '14 at 18:07
  • 2
    @DimitryK, I've been using the latest versions of Android Studio with Java 7 and the memory usage has improved. I've kept using Java 7. – user1906 Jul 06 '14 at 06:16
  • @user1906 thank you! I will try to use it now with Java `(build 1.8.0-b132)` on Ubuntu1204 and maybe later may try to fall back to java7 so see the difference. So far works ok. – Dimitry K Jul 06 '14 at 21:15
  • You can't modify any file in Android Studio directory in newer versions, because the checksum is being checked. Is there another way to fix this? – Michał Kisiel Nov 22 '14 at 16:29
  • @MichałKisiel, I downloaded one of the -rc versions recently and it worked after modifying the Info.plist file. – user1906 Dec 10 '14 at 23:40
  • @user1906 Yes, but you won't be able to update Android Studio now. – Michał Kisiel Dec 17 '14 at 16:59
  • @MichałKisiel, I just upgraded 1.0 to 1.0.1 without issue. I got a message about replacing the file, and that was it. I'm still on 10.8, I'm not sure if this works different on 10.9 or 10.10. – user1906 Dec 17 '14 at 22:56
  • You can just add the new version without removing the old ones, by separating versions with a comma. JVMVersion 1.6*,1.7+,1.8+ – Riad Krim Oct 04 '15 at 12:43
3

Changing SDK Location also works for Android Studio Project

enter image description here

enter image description here

vaichidrewar
  • 9,251
  • 18
  • 72
  • 86