Jdk 1.8 For Android Studio Free

  1. Android Studio Jdk Path
  2. Jdk 1.8 For Android Studio Free Downloads

Question or issue on macOS:

While compiling i get the error Error:compileSdkVersion android-21 requires compiling with JDK 7, saying that a newer version of JDK is required.

I’m running on OS X Yosemite with Android Studio v0.8.14

On Mac OS, run Android Studio with Java Runtime Environment (JRE) 6 for optimized font rendering. You can then configure your project to use Java Development Kit (JDK) 6 or JDK 7. GNOME or KDE desktop; GNU C Library (glibc) 2.15 or later; 2 GB RAM minimum, 4 GB. Program called JDK (Java Development Kit), this software includes the part, which is responsible to write and run the code and then send the result to the operating system. Install Java JDK and JRE To start creating the Java program, we must install the Android Studio (IDE) and to.

Things I checked :

java version “1.8.0_25”
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

I’m unable to find the folder location of jvm 1.8, any idea how I can fix there.

  1. Java Development Kit, or JDK, is the official development package for both amateur and experienced developers. While the program supports graphical IDE, it needs to be installed separately. Java Development Kit includes the Java Virtual Machine, which is essential to execute specific Java-based program types. The kit also comes with several.
  2. Xamarin.Android uses the Java Development Kit (JDK) to integrate withthe Android SDK for building Android apps and running the Androiddesigner. The latest versions of the Android SDK (API 24 and higher)require JDK 8 (1.8).
  3. A copy of the latest OpenJDK comes bundled with Android Studio 2.2 and higher, and this is the JDK version we recommend you use for your Android projects. To use the bundled JDK, proceed as follows: Open your project in Android Studio and select File Project Structure in the menu bar. In the SDK Location page and under JDK location, check the.

How to solve this problem?

Solution no. 1:

The Exact Fix for this Issue (Android Studio Users on Mac)

If you have already upgraded to Java 8, please note that the JDK location is now within /Library/Java compared to Java 6’s location /System/Library/Java. So to fix this problem, Right click on the Project folder > Project Structure > SDK Location.

Then change JDK location to

If you have installed a different JDK version (other than Java 8), find out the path using the java_home script first and use the output. Just run,

Solution no. 2:

Actually I just found the solution – JDK 7 is in /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home.

that got it working for me.
Oracle Docs on where JDK7 is installed

Solution no. 3:

I got a solution. It happened with me too and I searched a lot on Google but all I got was hints. A lot of hints. And I came up with a sure shot solution.

This is because the computer doesn’t have JDK 7 (or greater) installed. The JDK directory in AS/Configuration might points to JDK6. (That System/Library/…)

All you need to do is:

  1. Download latest JDK.
  2. Install it.
  3. Point Android Studio/Configure/Project Defaults/Project Structure/(JDK Location: ) to
    /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home

Text highlighted in bold-italics may differ, so it’s recommended that you browse it.
Hope this helps. Spent a whole day messing up with gradle, android studio. Happy coding.

Solution no. 4:

I found Eric and Subin’s answers combined solved my problem:

i.e. need to set the java JDK to Eric’s answer (assuming you’re using JDK 7):

/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home.

The mistake I made was I tried to just select the jdk1.7.0_71.jdk directory and I kept getting the error message “Please choose a valid JDK directory”.

I was working on the format previously used for JDK 6 🙁
– It worked when I gave it the full path down to into Contents/Home.

Subin’s answer tells you how to find your JDK location which may be different depending on what you’re trying to do.

Android Studio Jdk Path

Thanks Eric and Subin!

Solution no. 5:

I am sharing this because I want to help those that found this question when they Googled the error. Most other “answers” on the internet were very time consuming. Follow below before you waste so much time like I did.

What I did was to download JDK 7

Then change the setting of the jdk to 1.7.0

Solution no. 6:

I have been having this problem too. So far I cannot find a fix for it, so I’ve resorted to changing the maximum SDK version to 20, which works with JDK6.

As for the file location, instead of Android studio assuming it should be in /System/Library/Java/JavaVirtualMachines/Insert JDK version/Contents/Home.

In reality my JDK gets installed in /Library/Java/JavaVirtualMachines/JDK Version Here/Contents/Home.

Trying to select a JDK in the actual directory where its installed makes android studio say that I need to select a valid JDK location. For now I can’t find a fix, so like I said above, I have resorted to changing the maximum SDK version to 20 instead of 21 and it will stay like that until more people either suffer from the bug so that Google fix it. Or until an actual fix gets posted online instead of 101 ways for it not to work.

Hope this helps for now, it isn’t really a solution/answer but it is a work around that works for me, for the time being.

Solution no. 7:

if you only have folder 1.6.0.jdk then go to this link and download and install jdk 1.7. then find your java folder in this path

Jdk for android studio download

Solution no. 8:

The solutions on this thread are not valid for the same error in Android Studio 1.4 . The preferences menu, for example, is gone. Below is the solution for Android Studio 1.4 running on Ubuntu 14.04.

To solve in Ubuntu 14.04+ and Android Studio 1.4+, you need to go to

File -> Other Settings -> Default Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> Project Bytecode Version

This drop-down will be empty by default.

Set to your preferred JDK, in the case of the screencap below, 1.8 .

Voila, your project will compile.

Solution no. 9:

  1. Download from here latest JDK.
  2. Open command line tool.
  3. Copy and paste following line into your command line tool and press return.


/usr/libexec/java_home

  1. Copy output of this command.
  2. Go back to your android project, and navigate as below

Jdk 1.8 For Android Studio Free Downloads


File -> Project structure -> JDK location

edit(click on square with three dots) JDK location(2nd in image) and paste command line tool output there.


I have gathered these instructions using MacBook Pro.

Hope this helps!

Technical docs‎ > ‎Configuring Android Studio: IDE & VM Options, JDK, etc‎ > ‎

Mac OSX JDK Selection

Android Studio requires two different JDKs:

  • The version of Java that the IDE itself runs with.
  • The version of the JDK that it uses to get the Java compiler from
These two can be (and usually are) the same, but you can configure them individually. And on OSX in particular, they will often be different.

Project JDK

You can configure the JDK used for compiling your code in the Project Structure Dialog. This will be used to get a compiler to compile your code with. If you are building with compileSdkVersion 21 or later, you should use JDK 7 or JDK 8 here. You can also configure this path by editing the local.properties file in your project.

IDE JDK: Android Studio 2.2+

NOTE:
As of Android Studio 2.2, the IDE comes bundled with a custom OpenJDK build which contains a bunch of additional fixes to make the IDE work better (such as improved font rendering). If you've configured the IDE to use a custom JDK in the past, you should consider removing those configurations now and try the embedded JDK.

IDE JDK: Older versions

On Mac OSX, the version of Java used to run the IDE is generally chosen for you automatically, and the choice is based on an entry in the Info.plist file in the IDE installation. Please note: Do not edit Info.plist to pick a different version. That will break not only the application signature, but also future patch updates to your installation. Instead, you can pick a different JDK by setting the $STUDIO_JDK environment variable, as described in the IDE Configuration document.
On Mac OSX, the default version we are using to run the IDE (not to compile your code) is Java 6. This is primarily because the font rendering on Java 6 has full subpixel LCD antialiasing, whereas Java 7 and 8 does not.
Here's what some sample text looks like with Java 8:
And here's the IDE run with the same settings and Java 6 instead:

If you don't find the Java 6 version much more readable, you should use Java 8 instead, since it is more actively kept up to date. As described in the IDE Configuration document, you can run it like this:
$ open /Applications/Android Studio.app

(If you're curious about the difference: Java 6 performs rendering with Quartz, where in addition to slightly changing the colors, the fonts are rendered with subpixel LCD antialiasing. This might be the JDK bug tracking this: https://bugs.openjdk.java.net/browse/JDK-8023794).

Installing Java 6

If you double click on the Android Studio app bundle, Mac OSX should automatically pop up a dialog offering to install Java for you. If not, you can download it from this page:

Yosemite (Mac OSX 10.10) Issues

There are some reports about graphics glitches and other bugs specific to running Android Studio on Yosemite.
First, please make sure that you have the latest version of Java 6 installed; in some cases that has fixed the problems:

If not, try running a recent version of Java 7 or Java 8 instead by setting STUDIO_JDK as described above. That is reported to have fixed the other problems (though you will get the font rendering shown for Java 8 above.)