While setting up the Text Recognizer for MLKit on Android for a react-native project (following this tutorial: https://firebase.google.com/docs/ml-kit/android/recognize-text?authuser=0) I face an exception when launching the application with the react-native run-android command in my terminal.
It states I have duplicate classes and I tracked it down to when I add implementation 'com.google.firebase:firebase-ml-vision:24.0.0' to the app/build.gradle
Has anyone faced this before and resolved it? If I remove that line and change line 134 of android/app/build Gradle back to 'general' from 'mlkit' I can run my react-native-camera module but I cannot interface with the MLKit text recognizer.
Exception:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.vision.zzbm found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzck found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzcl found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzcm found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzjx found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzjy found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzjz found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzka found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzkb found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzkc found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzkd found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzke found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzkg found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
Duplicate class com.google.android.gms.internal.vision.zzl found in modules classes.jar (com.google.android.gms:play-services-vision-common:19.0.0) and classes.jar (com.google.firebase:firebase-ml-vision-face-model:17.0.2)
This question may have been asked with some other context and dependencies.
But I am still not able to figure out this even spending a whole day.
So below I'm pasting the complete Error log along with my Project level Gradle file and App level Gradle file.
Error log while trying to run the app:
Duplicate class com.google.android.gms.internal.measurement.zzdu found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzdv found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzdw found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzdx found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzdy found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzdz found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzea found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzeb found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzec found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzed found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzee found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzef found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzeg found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzeh found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzei found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzej found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzek found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzel found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzem found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzen found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzeo found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzep found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzeq found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzer found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzes found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzet found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzeu found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzev found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzew found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzex found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzey found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzez found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzfa found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzfb found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzfc found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzfd found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgb found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgc found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgd found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzge found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgf found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgg found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgh found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgi found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgj found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgk found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgl found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgm found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgn found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgo found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgp found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgq found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgr found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgs found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgt found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgu found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgv found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgw found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgx found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgy found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzgz found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzha found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhb found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhc found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhd found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhe found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhf found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhg found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhh found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhi found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhj found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhk found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhl found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhm found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhn found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzho found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhp found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhq found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhr found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhs found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzht found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhu found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhv found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhw found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhy found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzhz found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzia found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzib found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzic found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzid found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzie found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzif found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzig found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:15.0.2)
Go to the documentation to learn how to Fix dependency resolution errors.
My Project Gradle File:
`// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url 'http://maven.google.com' }
maven {
url 'https://maven.fabric.io/public'
}
maven{
url 'http://dl.bintray.com/amulyakhare/maven'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.2'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
`
App level build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.package.app"
minSdkVersion 17
targetSdkVersion 28
versionCode 4
versionName "0.4"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//resConfigs "en"
manifestPlaceholders = [
onesignal_app_id: 'API_KEY',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
//minifyEnabled true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/res/assets/'] } }
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.browser:browser:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation('com.mikepenz:materialdrawer:6.0.6#aar') {
transitive = true
}
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
implementation 'com.mikepenz:fastadapter:3.2.4#aar'
implementation 'com.mikepenz:fastadapter-commons:3.2.4#aar'
implementation 'com.mikepenz:fastadapter-extensions:3.2.4#aar'
implementation 'com.mikepenz:fastadapter-extensions-expandable:3.2.4#aar'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'
implementation 'com.firebaseui:firebase-ui-auth:6.0.2'
implementation 'com.google.firebase:firebase-auth:19.1.0'
//implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation("com.google.android.gms:play-services-analytics:17.0.0") {
exclude group: 'com.google.android.gms', module: 'play-services-measurement'
exclude group: 'com.google.android.gms', module: 'firebase-analytics-impl:15.0.2'
}
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.facebook.android:audience-network-sdk:4.99.1'
//implementation 'com.google.android.gms:play-services-ads:18.2.0'
implementation("com.google.android.gms:play-services-ads:18.2.0") {
exclude group: 'com.google.android.gms' , module: 'play-services-measurement'
exclude group: 'com.google.android.gms', module: 'firebase-analytics-impl:15.0.2'
}
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.synnapps:carouselview:0.1.5'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'com.stephentuso:welcome:1.4.1'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:8.0.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'androidx.room:room-runtime:2.1.0'
annotationProcessor 'androidx.room:room-compiler:2.1.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
}
apply plugin: 'com.google.gms.google-services'
googleServices { disableVersionCheck = true }
In ReactNative I have the next error:
Duplicate class com.google.android.gms.internal.measurement.zzbp found in moduules play-services-measurement-17.4.1-runtime.jar (com.google.android.gms:play-seervices-measurement:17.4.1) and play-services-measurement-sdk-api-18.0.3-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
It solved changing the next line on the build.gradle of android app level:
implementation 'com.google.firebase:firebase-analytics:17.4.1'
to
implementation 'com.google.firebase:firebase-analytics:18.0.3'
This was my problem also..i looked for the last dependency added, and that was
implementation 'com.google.firebase:firebase-ml-vision:24.0.1'
What I only did, is to reduce to number lower than that, because need for it. And it worked.
implementation 'com.google.firebase:firebase-ml-vision:24.0.0'
Regards Nenad
What worked for me was deleting the dependency "'com.google.gms:google-services:4.3.2'" Since I am using Flutter, it seems that the Flutter framework already addss this. So at runtime the project finds 2 dependencies. Try it.
Solved downgrading
implementation 'com.google.android.gms:play-services-ads:21.2.0'
To
implementation 'com.google.android.gms:play-services-ads:20.0.0'
Using react-native-text-detector caused this for me. Removing this essentially fixed this error. Its a bit extreme but its better than wasting hours of valuable time on this.
Just add this api in your dependencies in gradle
This will solve your problem
api 'com.google.firebase:firebase-core:21.1.1'
I hope this helps you
I am using Tesseract and Scanbot Android Document Scanner SDK. Both contain the same class for OCR reading. Since I am using Tesseract I no need to go for the Scanbot PII package which is offering PI packages + OCR. But unfortunately, their PI also contains the Tesseract modules. I need to exclude those classes from scanbot and I tried similar question's answers but it doesn't help.
Gradle:
implementation 'com.rmtheis:tess-two:6.0.0'
implementation 'io.scanbot:sdk-package-ui:$scanbotSdkVersion'
implementation ("io.scanbot:sdk-package-1:$scanbotSdkVersion"){
exclude group: "com.googlecode.leptonica.android"
}
It gives the following error:
Duplicate class com.googlecode.leptonica.android.AdaptiveMap found in
modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Binarize found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Box found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Boxa found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Clip found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Constants found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Convert found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Edge found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Enhance found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.GrayQuant found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.JpegIO found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.MorphApp found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Pix found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Pixa found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Pixa$1 found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Pixa$PixIterator found in
modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.leptonica.android.ReadFile found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Rotate found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Scale found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Scale$1 found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Scale$ScaleType found in
modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.leptonica.android.Skew found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.leptonica.android.WriteFile found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class com.googlecode.tesseract.android.PageIterator found in
modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.tesseract.android.ResultIterator found in
modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.tesseract.android.TessBaseAPI found in modules
classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar (io.scanbot:sdk-
core:1.54.0)
Duplicate class
com.googlecode.tesseract.android.TessBaseAPI$PageIteratorLevel found in
modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.tesseract.android.TessBaseAPI$PageSegMode
found
in modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.tesseract.android.TessBaseAPI$ProgressNotifier
found in modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.tesseract.android.TessBaseAPI$ProgressValues
found in modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
Duplicate class com.googlecode.tesseract.android.TessPdfRenderer found in
modules classes.jar (com.rmtheis:tess-two:6.0.0) and classes.jar
(io.scanbot:sdk-core:1.54.0)
I have a problem while building the project.The following is an error`enter FAILURE: Build failed with an exception.
Execution failed for task ':darnipora:checkDebugDuplicateClasses'.
1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.1.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.1.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.1.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.1.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$CallbackHandler found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback$StubApi21 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$CustomActionCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$CustomActionResultReceiver found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemCallback$StubApi23 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemReceiver found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImpl found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$1 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$2 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$3 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$4 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$5 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$6 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$7 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi23 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi26 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$1 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$2 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$3 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$4 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$5 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$6 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection$1 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection$2 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserServiceCallbackImpl found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem$1 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem$Flags found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SearchCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SearchResultReceiver found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ServiceBinderWrapper found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$Subscription found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SubscriptionCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SubscriptionCallback$StubApi21 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SubscriptionCallback$StubApi26 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21$ConnectionCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21$ConnectionCallbackProxy found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21$MediaItem found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21$SubscriptionCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21$SubscriptionCallbackProxy found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi23 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi23$ItemCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi23$ItemCallbackProxy found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi26 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi26$SubscriptionCallback found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi26$SubscriptionCallbackProxy found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaDescriptionCompat found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaDescriptionCompat$1 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaDescriptionCompat$Builder found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
Duplicate class android.support.v4.media.MediaDescriptionCompatApi21 found in modules classes.jar (androidx.media:media:1.0.0) and classes.jar (com.android.support:support-media-compat:28.0.0)
this is my file gradel
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 28
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/INDEX.LIST'
}
defaultConfig {
applicationId "com.darnipora.ui"
minSdkVersion /*10*/ 19
targetSdkVersion 28
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation project(':dateSliderLibrary')
implementation project(':touchGallery')
implementation 'com.stripe:stripe-android:11.1.1'
implementation project(':libraryNumPicker')
implementation project(':libraryPageCurl')
implementation project(':roundedimageview')
implementation project(':swipeListview')
implementation project(':rangebar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1#aar') {
transitive = true
}
implementation('com.mikepenz:materialdrawer:5.2.1#aar') {
transitive = true
}
implementation project(':simplecropview')
//The tiny Materialize library used for its useful helper classes
implementation project(':datePicker')
implementation project(':verticalSlidebarExample')
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
//noinspection GradleCompatible
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
implementation 'com.mikepenz:fastadapter-extensions:1.6.0#aar'
implementation 'com.mikepenz:materialize:1.2.1#aar'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.karumi:dexter:6.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.jakewharton:butterknife:10.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
implementation project(':relativeDateFormat')
implementation 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:2.0.24#aar'
implementation 'com.google.code.gson:gson:2.8.5'
}
and one more file
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
Sorry so short I just don't know how to describe the error in more detail.
Thank you for any help
I try to add firebase-core:17.0.0 in dependency but it display this error. I don't want to my code migrate into androidX :-
Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.internal.package-info found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.versionedparcelable.CustomVersionedParcelable found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.NonParcelField found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelField found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl$1 found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelUtils found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$1 found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$ParcelException found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelParcel found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream$FieldBuffer found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream$InputBuffer found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelable found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelize found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Go to the documentation to learn how to Fix dependency resolution errors.
but when i add this lines run perfect :-
configurations.all {
resolutionStrategy.force 'com.google.firebase:firebase-core:17.0.0'
}
but when i add these lines i can't access Firebase Analytics package.
How can i solve it?
I have got the solution to this error.
First, remove this code from your build.gradle file
configurations.all {
resolutionStrategy.force 'com.google.firebase:firebase-core:17.0.0'
}
Here you use the AndroidX supported library in your project. That's why they give you this kind of error.
Please first check firebase blog and confirm the usage library in your project is supported AndroidX. If yes then reduce that library version.