Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 611
Jack Wilson Avatar asked Mar 01 '20 05:03

Jack Wilson


1 Answers

I am using latest version of firebase firestore i.e.

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

and adding this line worked for me:

implementation 'com.google.guava:guava:27.0.1-android' 
like image 180
Feroz Khan Avatar answered Sep 18 '22 15:09

Feroz Khan