Jonathan Lin Jonathan Lin - 1 year ago 174
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

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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download