Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules jetified-guava-26.0-android.jar

Mike Lin :

I got errors

Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules jetified-guava-26.0-android.jar (com.google.guava:guava:26.0-android) and jetified-listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)

Go to the documentation to learn how to Fix dependency resolution errors.

After update

classpath 'com.android.tools.build:gradle:3.5.3'

to

classpath 'com.android.tools.build:gradle:3.6.1'

and gradle 5.4.1 to 5.6.4

Problem solved when downgrade

implementation 'com.google.firebase:firebase-firestore:21.4.1'

to

implementation 'com.google.firebase:firebase-firestore:21.4.0'

Is this a bug of firebase/firestore?

wildcat12 :

I think part of the issue is that Android Studio (or maybe the Gradle Plugin, however that is handled) is recommending to update the version of the Firestore dependency to 21.4.1 (likely depends on the order of repositories in your build.gradle - not sure on that). And yes, it seems that 21.4.1 causes the issue.

Gradle upgrade recommendation for Firestore lib to 21.4.1

So yeah, just ignore that recommendation and leave it at 21.4.0. Also...

  1. Firebase Docs show 21.4.0 as the correct version.
  2. MVN Repository shows 21.4.1 as the latest release.
  3. Google Maven Repo also lists 21.4.1 as the latest release.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=19414&siteId=1