Type com.bugsnag.android.InternalHooks is defined multiple times
See original GitHub issue_NOTE: I also posted this over here: https://github.com/bugsnag/bugsnag-android/issues/1387._
Describe the bug
Trying to build a release .apk and getting the error:
* What went wrong:
Execution failed for task ':app:mergeDexRelease'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Type com.bugsnag.android.InternalHooks is defined multiple times: /Users/me/myapp/node_modules/bugsnag-react-native/android/build/.transforms/da03a1461a1d0f0977ec88bf3e613f27/transformed/classes/dex/classes.dex, /Users/me/myapp/android/app/build/intermediates/external_libs_dex/release/mergeExtDexRelease/classes.dex
Steps to reproduce
- Using Gradle 7.0.2 and
com.bugsnag:bugsnag-android-gradle-plugin:7.1.0
. ./gradlew assembleRelease
Environment
- Android version: 30
- Bugsnag version:
"@bugsnag/react-native": "7.13.1"
- Emulator or physical device: n/a
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Type BuildConfig is defined multiple times - Stack Overflow
I'm using Android Studio 4.0.1 on MacOS. On my network drive within the project app ...
Read more >Program type already present: com.bugsnag.android ... - GitHub
Expected behavior Build Compilation should be sucessfull Observed behavior Getting Error: > com.android.builder.dexing.
Read more >Bugsnag docs › Platforms › Android
Learn how to integrate Bugsnag with your Android application for automatic crash reporting and detailed diagnostic reports.
Read more >Android Studio generating an error saying “is defined multiple ...
Just delete the “build” folder of the “app” module. Afterward, please go to the Build drop-down menu in the menu bar.
Read more >Bugsnag Android Gradle Plugin - Maven Repository
Version Vulnerabilities Repository Usages Date
7.4.x 7.4.0 Central 1 Nov 10, 2022
7.3.x 7.4.x 7.3.1 Central 1 Oct 05, 2022
7.3.x 7.3.0 Central 0 Jul 27,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for letting us know this is resolved 😀
Yup, I’m an idiot. Sorry. After a botched rebased conflict resolution, we somehow still had the old
"bugsnag-react-native"
package in ourpackage.json
. After removing that and re-running, everything is building fine.Sorry about that and thanks again for your help! 🙏