Jonathan Lin Jonathan Lin - 1 month ago 16
Android Question

Using Android Studio with Java 1.7

I was trying to get Android Studio to use Java 1.7 on Mac OS X (Mountain Lion)

I went to

File > Project Structure...
and then tried to add a JDK with the
+
button and then selecting
JDK
.

I navigated to
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
and selected that, but nothing happens. (this is where Oracle's Java updater installed Java 7 automatically)

How do I use Java 1.7 with Android Studio?

Answer

I went to Java SE Downloads and downloaded Java 7 again. The method mentioned above worked for Eclipse.

Running the installer from this manual download placed the JDK in /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home, which was accepted by Android Studio.

Comments