当前位置:   article > 正文

Android studio提示Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8._android gradle plugin requires java 17 to run. you

android gradle plugin requires java 17 to run. you are currently using java

1、 问题

在Android studio里面运行java的lib库,但是错误提示如下

  1. Build file 'F:\sourceZip\app\build.gradle' line: 2
  2. An exception occurred applying plugin request [id: 'com.android.application']
  3. > Failed to apply plugin 'com.android.internal.application'.
  4. > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
  5. You can try some of the following options:
  6. - changing the IDE settings.
  7. - changing the JAVA_HOME environment variable.
  8. - changing `org.gradle.java.home` in `gradle.properties`.
  9. * Try:
  10. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

2、解决办法


点击File->Settings->输入Gradle->选Gradle JDK为11

 

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/774686
推荐阅读
相关标签
  

闽ICP备14008679号