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

报错信息:

An exception occurred applying plugin request [id: 'com.android.application']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.

解决Gradle plugin requires java11 to currently using Java 1.8
第一步:


image.png

然后在如下界面点击Gradle Settings


image.png

Gradle JDK选择如下的Gradle JDK版本 (温馨提示:没有找到如下的Gradle JDK版本,可点击Download JDK进行下载11版本的JDK)


image.png

最后点击OK 运行就可以了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容