1.项目的Terminal下使用 gradlew processDebugManifest --stacktrace 命令
2.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`.
3.因为项目中还有其他项目使用JDK8,所以changing the IDE settings和changing the JAVA_HOME environment variable不能用
4.使用推荐的第三个方法:changing `org.gradle.java.home` in `gradle.properties`.
4.1先下载JDK11,我的事Mac,所以安装完成之后会在
/Library/Java/JavaVirtualMachines/jdk11
4.2在grad le.properties中增加:
org.gradle.jave.home=/Library/Java/JavaVirtualMachines/jdk11.0.2.jdk/Contents/Home
4.3 如果还不行,最好把compileVersion降到30