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

?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容