app BUILD FAILED after i install @react-native-firebase/app
package.json
"@react-native-firebase/app": "^18.0.0",
"react-native": "0.70.0",
this is my build.gradle
implementation project(':react-native-pusher-push-notifications')
implementation 'com.pusher:push-notifications-android:1.9.0'
implementation ("com.google.firebase:firebase-iid:21.1.0")
implementation ("com.google.firebase:firebase-messaging:23.0.0")
implementation 'androidx.multidex:multidex:2.0.1' // <-- ADD THIS DEPENDENCY
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.android.gms.internal.measurement.zzdu found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-impl:16.1.1) and jetified-play-services-measurement-sdk-api-21.3.0-runtime (com.google.android.gms:play-services-measurement-sdk-api:21.3.0)
Duplicate class com.google.android.gms.internal.measurement.zzdv found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-impl:16.1.1) and jetified-play-services-measurement-sdk-api-21.3.0-runtime (com.google.android.gms:play-services-measurement-sdk-api:21.3.0)
Duplicate class com.google.android.gms.internal.measurement.zzdw found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-impl:16.1.1) and jetified-play-services-measurement-sdk-api-21.3.0-runtime (com.google.android.gms:play-services-measurement-sdk-api:21.3.0)
Duplicate class com.google.android.gms.internal.measurement.zzdx found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-impl:16.1.1) and jetified-play-services-measurement-sdk-api-21.3.0-runtime (com.google.android.gms:play-services-measurement-sdk-api:21.3.0)
Duplicate class com.google.android.gms.internal.measurement.zzdy found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-impl:16.1.1) and jetified-play-services-measurement-sdk-api-21.3.0-runtime (com.google.android.gms:play-services-measurement-sdk-api:21.3.0)
Duplicate class com.google.android.gms.internal.measurement.zzdz found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-impl:16.1.1) and jetified-play-services-measurement-sdk-api-21.3.0-runtime (com.google.android.gms:play-services-measurement-sdk-api:21.3.0)
Duplicate class com.google.android.gms.internal.measurement.zzea found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-impl:16.1.1) and jetified-play-services-measurement-sdk-api-21.3.0-runtime (com.google.android.gms:play-services-measurement-sdk-api:21.3.0)
Duplicate class com.google.android.gms.internal.measurement.zzeb found in modules jetified-firebase-analytics-impl-16.1.1-runtime (com.google.firebase:firebase-analytics-
2
Answers
i found the problem
with this package "react-native-pusher-push-notifications": "^2.5.2",
so what i do is install an older version from firebase
so i replace this "@react-native-firebase/app": "^18.0.0", with "@react-native-firebase/app": "^14.12.0",
and now everything is working fine
android / app / build.gradle
add this