【发布时间】:2021-05-08 23:08:27
【问题描述】:
根据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 版仍然存在同样的问题。
【问题讨论】: