Android N Requires the Ide to Be Running with Java 1.8 or Later

Android N requires the IDE to be running with Java 1.8 or later?

Set JDK_HOME and JAVA_HOME environment variables, in my case C:\Program Files\Java\jdk1.8.0_60.

Sample Image

Check Java version in Help > About. It should show the JRE version you just set.

Sample Image

That is it, now you can preview your layout in N.

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

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

MBP-Vitaliy:~$ java -versionjava 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)

Android Studio Error Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

Make sure that your Gradle is using the proper JDK.
Try running ./gradlew --version in your project's directory. The output should be something like this:

Gradle 7.0-rc-2
------------------------------------------------------------

Build time: 2021-04-01 21:26:39 UTC
Revision: 912a3368b654b71250dfc925a20d620393

Kotlin: 1.4.31
Groovy: 3.0.7
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 11.0.10 (Ubuntu 11.0.10+9-Ubuntu-0ubuntu1.20.10)
OS: Linux 5.11.4-051104-generic amd64

If the JVM points to version 1.8 then you should change it in settings. You can find it in PreferencesBuild, Execution, DeploymentBuild ToolsGradle → *Gradle JDK.

Sample Image

android-24' requires JDK 1.8 or later to compile

In Android Studio open:

File > Project Structure > see if JDK location points to your JDK 1.8 directory.

Note: you can use compileSdkVersion 24

How to solve Android Studio rendering problems?

You have old JDK (Java Development Kit) installed to build apps for Android N. Go to this link (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and install java 1.8 or later.

What is Android N and why does it think I'm building with it? (Android Studio 2.1.2, Windows 7)

So what is Android N ?

It is the next version of Android, API Level 24. The tasty treat is Nougat.

(no, really, that's the name)

Where am I telling it that I need "Android N", and how do I change that?

If you are getting that in the design view, that's the version of Android that is being used for the preview. It defaults to the latest version whose SDK bits you have installed.

To change it, switch it in the bugdroid drop-down on the right side of the design view toolbar:

Android Studio Design View Toolbar



Related Topics



Leave a reply



Submit