I have tried to connect firebase to my existing android project with Admob integration and I got the following error stack when build the project.
Duplicate class com.google.android.gms.internal.measurement.zzdi found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdj found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdk found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdl found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdm found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdn found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdo found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdp found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdq found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdr found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzds found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdt found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdu found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdv found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzdw found in modules classes.jar (com.google.android.gms:play-services-appinvite:16.0.4) and classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0)
Duplicate class com.google.android.gms.internal.measurement.zzfq found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfr found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfs found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzft found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfu found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfv found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfw found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfx found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfy found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzfz found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzga found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
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:16.0.4)
Duplicate class com.google.android.gms.internal.measurement.zzu found in modules classes.jar (com.google.android.gms:play-services-measurement-sdk-api:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:16.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzv found in modules classes.jar (com.google.android.gms:play-services-measurement-sdk-api:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:16.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzw found in modules classes.jar (com.google.android.gms:play-services-measurement-base:17.0.0) and classes.jar (com.google.firebase:firebase-analytics-impl:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurement 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurement$ConditionalUserProperty 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Event 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurement$EventInterceptor 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurement$OnEventListener 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Param 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurement$UserProperty 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurementContentProvider 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver 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:16.2.2)
Duplicate class com.google.android.gms.measurement.AppMeasurementJobService found in modules classes.jar (com.google.android.gms:play-services-measurement:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.AppMeasurementReceiver found in modules classes.jar (com.google.android.gms:play-services-measurement:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.AppMeasurementService found in modules classes.jar (com.google.android.gms:play-services-measurement:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zza 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzaa 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzab 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzac 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzad 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzae 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzaf 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzag 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzah 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzai 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzaj 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzak 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzal 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzam 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzan 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzao 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzap 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzaq 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzar 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzas 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzat found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzau found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzav found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzaw found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzax found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzay found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzaz found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzb 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzba 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbb 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbc 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbd 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbe 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbf 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbg 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbh 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbi 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbj 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbk 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbl 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbm 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbn found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzbo 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbp 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbq 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbr 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbs 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbt 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbu 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzbv found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzbw found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzbx found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzby found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzbz found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzc 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:16.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzca found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzcb found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzcc found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzcd found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzce found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzcf found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzcg found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Duplicate class com.google.android.gms.measurement.internal.zzch found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.0.0) and classes.jar (com.google.firebase:firebase-analytics:16.0.4)
Basically I want to add Admob rewards adz in my app so I had to use
implementation 'com.google.android.gms:play-services-ads:18.2.0'
It seems to be there is a complict with implementation 'com.google.android.gms:play-services-ads:18.2.0' and implementation 'com.google.firebase:firebase-invites:16.0.4'
Gradle file
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.vivo.proj.firebase_example"
minSdkVersion 23
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.firebase:firebase-invites:16.0.4'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-ads:18.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Could please help me to solve this issue.
From the docs:
Firebase Invites is deprecated. On January 24th, 2020,
we will discontinue support for Firebase Invites. Instead, use Firebase Dynamic Links for a custom sharing solution
Use the following dependency :
implementation 'com.google.firebase:firebase-dynamic-links:19.0.0'
https://firebase.google.com/support/release-notes/android
Go to Build.gradle and update Firebase implementation to new version. That works for me.
I am trying to use Firebase database in my Android App ut I'm dealing with some errors:
I got this error first:
Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:6:5-24:19 to override.
I searched a way to fix it and found that migrating to AndroidX would be a good thing to do. But after I migrated to AndroidX (Refactor -> Migrate to AndroidX) I got this error:
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)
Android Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.appv1">
<application
tools:node="replace"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle (Module:app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.appv1"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// Displaying images
implementation 'com.github.bumptech.glide:glide:3.6.1'
// Firebase
implementation 'com.google.firebase:firebase-database:9.6.0'
// Add the SDKs for any other Firebase products you want to use in your app
// For example, to use Firebase Authentication and Cloud Firestore
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-firestore:21.2.1'
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
}
repositories {
jcenter()
maven { // <-- Add this
url 'https://maven.google.com/'
}
}
apply plugin: 'com.google.gms.google-services'
build.gradle (Project:Appv1)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:3.0.0'
// 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
}
I think it is a dependency error because implementation 'com.android.support:appcompat-v7:28.0.0'is underlined in red.. but I don't know how to fix it.. Can anyone please help me?
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 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'm getting duplicate class errors when I try to build android app that use firebase-firestore and google-cloud-language.
Duplicate class com.google.api.Advice found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
Duplicate class com.google.api.Advice$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
Duplicate class com.google.api.Advice$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
Duplicate class com.google.api.AdviceOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
...
Duplicate class com.google.type.TimeOfDayProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
My build.gradle looks like follow:
...
dependencies {
...
implementation 'com.google.firebase:firebase-ml-vision:20.0.0'
implementation 'com.google.firebase:firebase-firestore:19.0.0'
implementation 'io.grpc:grpc-okhttp:1.19.0'
implementation'com.google.cloud:google-cloud-language:1.76.0'
}
How can I solve the issuse ?