The project's Gradle version 8.5 is incompatible with the Gradle JVM version 25
https://docs.gradle.org/9.1.0/release-notes.html
Gradle 9.1.0 才支持 Java 25。
修改 gradle-wrapper.properties
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-9.1.0-bin.zip
修改 build.gradle
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:9.0'
}
}
Sync 报错 Unrecognized VM option 'MaxPermSize=512m'
gradle.properties
MaxPermSize 改成 MaxMetaspaceSize
Sync 还是报错
org.gradle.internal.service.ServiceCreationException: Could not initialize native services.
Caused by: net.rubygrapefruit.platform.NativeException: Failed to initialise native integration.
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\Administrator\.gradle\native\0.2.8\x86_64-windows-gnu\gradle-fileevents.dll: ???????
完了,安卓项目全部停工。