Skip to content

Conversation

breannamporter
Copy link

@breannamporter breannamporter commented Sep 4, 2024

Was trying to do a release build while testing our CI for the package manager changes and was running into a bunch of these DexArchiveMergerException issues (note: these only happen for release builds which is why no one has noticed it, this is also an issue in the lp3 branch), so I took some inspo from this commit of @hhff's and just moved the classes with conflicts to a different package. This resolves the issue but I wasn't sure if there was a better way to go about it, so please let me know if there is.

More context in this thread: https://twist.com/a/133876/ch/352130/t/6367409/

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDexLp3Release'.
> 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.google.android.mms.MmsException is defined multiple times: /Users/breporter/Sanctu/git/light-two/LightOS/android/android-smsmms/library/build/.transforms/c63196ec321ccbdf18927b2a1de2c634/transformed/lp3Release/lp3Release_dex/com/google/android/mms/MmsException.dex, /Users/breporter/Sanctu/git/light-two/LightOS/android/app/build/intermediates/external_libs_dex/lp3Release/mergeExtDexLp3Release/classes6.dex

To test this locally you can just cd into the androidsmsmms submodule and checkout this branch from there. You can then revert this by running git pull --recurse-submodules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant