打开 AndroidStudio 之后就收到了更新提示, 为了 Arctic Fox 的版本代号, 必须体验一把啊! 不过也遇到了几个问题, 在这记录一下.
Android Gradle plugin 需要 jre 版本大于等于 11.0
我本地装的 JDK 是 1.8.191 的, 编译直接就报错了:
1 2 3 4 5 6 7
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`.
A problem occurred configuring root project 'Test'. > Could not resolve all dependencies for configuration ':classpath'. > Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(http://maven.domain.org/nexus/content/groups/public)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.0.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.