Based on some googling, it seems that there is some overlap between 2 packages. I've encountered a similar issue in the past and I think I was able to fix it with ./gradlew clean, but that isn't fixing my current issue. Here's the error:
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Program type already present: io.invertase.firebase.BuildConfig
I started encountering this issue as I was trying to get react-native-firebase wired up into my application. Here are a few relevant dependencies in my package.json file:
"@react-native-firebase/app": "^6.0.3",
"@react-native-firebase/database": "^6.0.3",
"firebase-auth": "^0.1.2",
"react-native-firebase": "^5.5.6",
Do I need to uninstall one of these packages or is it possible that I made a wireup mistake in a file like build.gradle, MainApplication.java?
Once manually removing the ./node_modules/react-native-firebase folder, I was able to successfully run: npx react-native run-android
I was able to successfully react-native run-android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With