我正在构建一个 Android 项目。当我打开项目时,在 gradle 同步期间,我不断收到以下错误消息:
Duplicate key AdditionalClassifierArtifactsImpl(
id= ArtifactIdentifierImpl(groupId=org.threeten, artifactId=threetenbp, version=1.4.1),
sources= /home/khongor/.gradle/caches/modules-2/files-2.1/org.threeten/threetenbp/1.4.1/412dfb27bd690a17f9de51863a65ccc3335572fb/threetenbp-1.4.1-sources.jar,
javadoc= /home/khongor/.gradle/caches/modules-2/files-2.1/org.threeten/threetenbp/1.4.1/524c94e2a9d0d3f0ba8c4dba758ad2c292012e77/threetenbp-1.4.1-javadoc.jar,
mavenPom= /home/khongor/.gradle/caches/modules-2/files-2.1/org.threeten/threetenbp/1.4.1/f0ed3678821f1d84940562243b0b78a13b5e5a3/threetenbp-1.4.1.pom,
sampleSources= null
)
build gradle 中的相关部分:
// ThreeTenABP
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.2'
// ThreetenBP - For testing
testImplementation('org.threeten:threetenbp:1.4.1') {
// https://github.com/JakeWharton/ThreeTenABP/issues/14
exclude group: 'com.jakewharton.threetenabp', module: 'threetenabp'
}
但是,如果我使用 Gradle 文件执行手动同步项目,则 gradle 同步成功。有人知道什么可能导致错误消息?