Android Studio Error "Android Gradle Plugin Requires Java 11 to Run. You Are Currently Using Java 1.8"

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 Gradle plugin requires Java 11 to run. You are currently using Java 1.8, but i'm using java 11

Is your place set up?

Is the gradle java version too low

   JAVA_HOME D:\Android\Android Studio\jre
%JAVA_HOME%\bin

Sample Image

Error: Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. -& Failed to apply plugin 'com.android.internal.application'

Well I also face same issue

Image showing same error

What worked for me is this (In Windows 10 OS based Laptop)

Go to File-->Settings-->Build,Execution,Deployment-->Build Tools-->Gradle

Now here -->Gradle JDK change 1.8 to 11(given in dropdown).

See image given to get more clear idea.

Steps to get Answer to given problem

After that just REBUILD YOU PROJECT. It worked for me. (see attached image).
Screen showing every thing is fine now and answer worked properlly.

SO ERROR IS SOLVED AND EVERY THING IS FINE IN PROJECT NOW.

HOPE THIS WORKS FOR YOU TOO! THANKS.

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. React Native

what you need to do;

  1. log into my computer
  2. right click and select properties
  3. enter advanced system settings
  4. add new path name: JAVA_HOME
  5. select the java 11 jdk location and save it

or

  1. open cmd for adminstator
  2. setx JAVA_HOME -m "path"

After doing all of them, delete your old React Native project and install a new one.

or

  1. open project with android stiduo
  2. find node_moduls -> react-native-gradle-plugin -> build.gradle -> change java 1.8 to java 11.0

Why is JAVA version not detected? Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

Two solutions for your problem:

  1. In the gradle.properties file at the project level, you can add a property called org.gradle.java.home=C:\\Program Files\\Java\\jdk11.0.0 (Don't add quotation marks before or after the path)

  2. Put JDK 11 path in your PATH environment variable, and remove all other JDKs from it.

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

The problem was that JitPack.io was running with JDK1.8 on its own. Add a jitpack.yml file to the project file with this content:

jdk:
- openjdk11

When I did that the problem went away.

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. **EXPO.dev**

Fixed by adding into eas.json:

"production": {
"android": {
"image" : "latest"
}
}

flutter:Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

Kindly upgrade your java version



Related Topics



Leave a reply



Submit