報錯信息:
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.
- changingorg.gradle.java.homeingradle.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 運行就可以了