JCenter 关闭后的 Gradle 生成
如果在 AppCenter Android 生成中使用 JCenter 和 Bintray 资源,并且生成在 Gradle 任务失败时失败 (则无法收到资源错误) ,这是因为 JCenter Bintray 正在关闭。 生成日志中 (行) 说明了此问题:
Resolved com.android.tools.build:gradle:3.5.4 in :classpath Resolved com.google.gms:google-services:4.2.0 in :classpath Project mobileapp at : is either no Android app project or build version has not been set to override. Skipping... Configure project :@react-native-community_async-storage Project @react-native-community_async-storage at :@react-native-community_async-storage is either no Android app project or build version has not been set to override. * What went wrong: Execution failed for task ':app:***'. Could not resolve all files for configuration ':app:lintClassPath'. Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15) Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'. Could not GET 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
此问题是由于 JFrog 于 2021 年 5 月 1 (Bintray) 的一部分关闭 JCenter。 JCenter 是 Android 开发的重要组成部分,因为 Android 项目的主要部分托管在此站点上。 Android 开发人员应防止某些旧库不再维护,将库移植到 Maven Central。 这些文章会告知你需要了解和执行哪些操作,以避免对生成管道造成中断。