Android Studio 长颈鹿 | 2022.3.1 我将项目更新为 gradle 8.0,androidGradlePluginVersion = '8.1.0' 它要求更新 java 版本
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
Run Code Online (Sandbox Code Playgroud)
AS 工作正常
我们正在使用 Appcenter ms 来分发构建,但它不会使用此升级版本来编译构建
从 Appcenter 收到此错误
Failed to apply plugin 'com.android.internal.library'.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Your current JDK is located in /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.19-7/x64/Contents/Home
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`. …Run Code Online (Sandbox Code Playgroud)