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

大致错误如下:

A problem occurred evaluating project ':app'.
> 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`.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Android Gradle插件需要Java 11才能运行。您当前正在使用Java 1.8(或者其它版本),其实就是JDK版本不匹配,只要设置对应的JDK版本即可。

按照下图的顺序操作设置即可:

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8_第1张图片

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8_第2张图片

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8_第3张图片

你可能感兴趣的:(Android,Studio,Error,android,java,开发语言)