-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Open
Labels
P3no SLOno SLOplatform=androidstatus=triagedtype=otherMiscellaneous activities not covered by other type= labelsMiscellaneous activities not covered by other type= labels
Description
An Android project would not build correctly but always complain about duplicate classes:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules jetified-guava-32.1.1-android (com.google.guava:guava:32.1.1-android) and jetified-listenablefuture-1.0 (com.google.guava:listenablefuture:1.0)
The release notes of 32.1.0 (which are referenced in 32.1.1) said to use
configurations.all {
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
select("com.google.guava:guava:0")
}
// and/or
resolutionStrategy.capabilitiesResolution.withCapability("com.google.guava:listenablefuture") {
select("com.google.guava:guava:0")
}
}
to solve this problem, but it didn't work.
What worked instead was to add:
dependencies {
# dependency definitions here ...
modules {
module("com.google.guava:listenablefuture") {
replacedBy("com.google.guava:guava", "listenablefuture is part of guava")
}
}
}
cyrilico, joergi, storytellerF, erawhctim, frdenzer and 2 more
Metadata
Metadata
Assignees
Labels
P3no SLOno SLOplatform=androidstatus=triagedtype=otherMiscellaneous activities not covered by other type= labelsMiscellaneous activities not covered by other type= labels