Ayush Gupta
Ayush Gupta

Reputation: 9305

Which JDK version is the latest supported by Android Studio?

I am trying to install Android Studio on Ubuntu 18.04.

I downloaded and extracted Android Studio 3.1, and was wondering which JDK version is the last supported by Android Studio.

According to Oracle JDK page, JDK 8 has reached EOL:

Oracle will not post further updates of Java SE 8 to its public download sites for commercial use after January 2019. Customers who need continued access to critical bug fixes and security fixes as well as general maintenance for Java SE 8 or previous versions can get long term support through Oracle Java SE Subscription or Oracle Java SE Desktop Subscription. For more information, and details on how to receive longer term support for Oracle JDK 8, please see the Oracle Java SE Support Roadmap.

I installed Oracle JDK 11.0.1 for my Android studio as it is latest, but it throws the error:

Error: Could not find or load main class com.intellij.idea.Main
Caused by: java.lang.ClassNotFoundException: com.intellij.idea.Main

When starting android studio.

java -version

Gives Output:

java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

And

echo $JAVA_HOME

Gives Output

/usr/lib/jvm/jdk-11.0.1

Which JDK version should I use?

Upvotes: 3

Views: 13618

Answers (1)

yole
yole

Reputation: 97328

You should use the JDK version bundled with Android Studio; you don't need a separate JDK installation. The bundled JDK version is currently based on OpenJDK 8, but it's actively maintained by JetBrains, which backports security fixes and other improvements to that version.

Upvotes: 4

Related Questions