1

I have the issue

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

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

The solution requires to download JDK 11.0, then change gradle projects - the option is not available in Android studio. Do I need to upgrade android studion or change the setups?

enter image description here

J L
  • 647
  • 1
  • 7
  • 15

1 Answers1

1

No, you do not need to do anything that complex. First, download OpenJDK 11 from here. Extract the contents of the zip in a folder. Then, find the gradle.properties file in your android project (Create one if it's not there). Then. add this property to it:

org.gradle.java.home=path/to/jdk11

Note: Do not point towards the bin folder, just point towards the home JDK 11 directory.

JustinW
  • 2,567
  • 1
  • 13
  • 29