在 Android Gradle Repositories 中替换 jcenter()
根据JFrog的说法,他们将于2021年5月1日日落Bintray(包括JCenter)。
为了准备这个,我打开了我的,并替换为.我现在看起来像这样(删除了一些部分):build.gradle
jcenter()
mavenCentral()
build.gradle
buildscript {
repositories {
google()
// jcenter()
mavenCentral()
}
dependencies {
// ...
}
}
allprojects {
repositories {
google()
// jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}
但是,由于替换为 ,我收到此错误:jcenter()
mavenCentral()
A problem occurred configuring root project 'Redacted'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.trove4j:trove4j:20160824.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
Required by:
project : > com.android.tools.build:gradle:4.1.2 > com.android.tools.build:builder:4.1.2 > com.android.tools:sdk-common:27.1.2
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
我是否可以添加其他存储库来解决此问题,或者是否需要更新才能使用 其他版本的 ?com.android.tools:sdk-common
org.jetbrains.trove4j:trove4j
更新:版本4.1.3仍然存在相同的问题。