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

1

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.