FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:checkReleaseDuplicateClasses’.
Duplicate class com.google.firebase.Timestamp found in modules jetified-firebase-common-21.0.0-runtime (com.google.firebase:firebase-common:21.0.0) and jetified-firebase-firestore-24.0.0-runtime (com.google.firebase:firebase-firestore:24.0.0)
Duplicate class com.google.firebase.Timestamp found in modules jetified-firebase-common-21.0.0-runtime (com.google.firebase:firebase-common:21.0.0) and
Duplicate class com.google.firebase.Timestamp found in modules jetified-firebase-common-21.0.0-runtime (com.google.firebase:firebase-common:21.0.0) and jetified-firebase-firestore-24.0.0-runtime (com.google.firebase:firebase-firestore:24.0.0)
2
Answers
add = > include ‘:@react-native-firebase_app’ project(‘:@react-native-firebase_app’).projectDir = new File(rootProject.projectDir, ‘../node_modules/@react-native-firebase/app/android’) in settings.gradle dont work for me. Did you do anything different besides that?
my firebase versions:
The error:
I have same issue occurred in my react native firebase project. I have fixed the issue by changing in
android/app/build.gradle
file.Note : versions for Firebase SDKs are chosen automatically by the BoM, so just remove or modify if any firebase dependency ends with specific version or
:+
In my case, I am not using firebase analytics in my app but it still implemented in gradle file. So, I have comment 1 firebase dependency
com.google.firebase:firebase-analytics:+
and my issue resolved.Don’t forget to remove node_modules and clean Android build folder before rebuild. Thanks 😊👍.