美文网首页
Android Gradle plugin requires J

Android Gradle plugin requires J

作者: 程序猿峰岑 | 来源:发表于2022-03-06 09:36 被阅读0次

报错信息:

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 运行就可以了

相关文章

网友评论

      本文标题:Android Gradle plugin requires J

      本文链接:https://www.haomeiwen.com/subject/ksvirrtx.html