Fix error "android gradle plugin requires java 11 to run. you are currently using java 1.8."

Recently, after upgrading to Android Studio Arctic Fox, the Gradle version changed and when I tried to compile, the following error occurred. I have summarized the cause of the error and the solution simply.

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

1. Cause of problem

The cause of the error above was that the Gradle plugin requires Java 11, but the project's Java version setting was set to Java 1.8, which did not meet the minimum requirements, resulting in a build error.

2. How to fix

If you change the Java version of the project to 11, the problem will be solved.

If you go to the [File] -> [Settings...] menu, you will see the following screen, and if you go to the [Build, Execution, Deployment] -> [Build Tools] -> [Gradle] menu, you can change the Java version of the Gradle project. Change the version of the Gradle JDK item to 11 and press the OK button. android gradle plugin requires java 11 to run. you are currently using java 1.8

Try rebuilding...

Related Posts

codechachaCopyright ©2019 codechacha