Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Nougat requires the IDE to be running with Java 1.8 or later [duplicate]

Tags:

enter image description hereenter image description here

Inspite of having JDK 8 installed, I'm getting this error. What can the issue be?

like image 781
Abhilash Avatar asked Aug 31 '16 04:08

Abhilash


People also ask

What version of JDK is required for Android Studio?

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.

Is JRE required for Android Studio?

Android Studio is a customized version of JetBrains' IntelliJ IDE, which is, in turn, a Java application. Therefore, as we established, to launch IntelliJ (and, consequently, Android Studio) on your computer, you need to have JRE installed.

Does Android Studio automatically install JDK?

Note that installing Android Studio doesn't automatically configure the built-in JDK command line tools. This matters if you want to use the Android SDK command line tools.

Does JDK 11 work with Android?

Compilation with JDK11 is no longer supported in Android Studio 3.5 Beta 3.


1 Answers

  1. Check installed java version, it should be 1.8 or later.

MBP-Vitaliy:~$ java -version  java version "1.8.0_92"  Java(TM) SE Runtime Environment (build 1.8.0_92-b14)  Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
  1. Check java version in Android Studio. In Mac OS X: Android Studio -> About Android Studio. Where JRE should be 1.8 or later.

  2. If you have another, In Mac OS X go to Applications folder find AndroidStudio.app and click Show content, then find in Content folder Info.plist file and change JVM VERSION to 1.8 manually.

<key>JVMVersion</key>  <string>1.8</string>
  1. Restart Android Studio.
like image 140
Vitalii Movchan Avatar answered Nov 25 '22 05:11

Vitalii Movchan