Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build Fails with - D8: Program type already present #11

Open
unstableair opened this issue Aug 8, 2019 · 0 comments
Open

Android build Fails with - D8: Program type already present #11

unstableair opened this issue Aug 8, 2019 · 0 comments

Comments

@unstableair
Copy link

unstableair commented Aug 8, 2019

Cordova build for Android fails with:

> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
D8: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 
  Program type already present: android.support.v4.os.ResultReceiver$1
  Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.

This is easy to recreate:

cordova create test com.test test
cd test
cordova platform add android@latest
cordova plugin add cordova-facebook-audnet-sdk
cordova build

Cordova 9.0.0
Android 8.0.0

Installing cordova-plugin-androidx allows the build to complete but app crashes immediately on open. Environment works fine if cordova-facebook-audnet-sdk is not installed.

@unstableair unstableair changed the title Android build Fails with - D8: Program type already present ($100 bounty available for fix) Android build Fails with - D8: Program type already present Mar 16, 2020
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

No branches or pull requests

1 participant