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

How to Fix Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. - Failed to apply plugin 'com.android.internal.application'. - Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing `org.gradle.java.home` in `gradle.properties`.

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

  1. Choose Gradle Scripts then gradle.properties .
  2. Add this Line in the first line
    org.gradle.java.home=C:\\Program Files\\Java\\
    then go to
    C:\Program Files\Java
    and choose jdk folder and copy the jdk folder name then add folder name in the end of the first line to be
    org.gradle.java.home=C:\\Program Files\\Java\\jdk-11.0.15.1
  3. Run App .