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

Error: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver #123

Closed
benskarunya opened this issue Aug 12, 2019 · 7 comments

Comments

@benskarunya
Copy link

benskarunya commented Aug 12, 2019

Hi, I am getting this error using it in ionic 3 cordova@9.0.0 Android@8.0.0. Please advise

@davidquon
Copy link

I'm having the same issue building for Android. Here is my ionic info.

$ ionic info

Ionic:

   Ionic CLI                     : 5.2.4 (/Users/DQ/.nvm/versions/node/v10.15.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.7.4
   @angular-devkit/build-angular : 0.802.1
   @angular-devkit/schematics    : 8.2.1
   @angular/cli                  : 8.2.1
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 10 other plugins)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   Android SDK Tools : 26.1.1 (/Users/DQ/Library/Android/sdk)
   NodeJS            : v10.15.0 (/Users/DQ/.nvm/versions/node/v10.15.0/bin/node)
   npm               : 6.4.1
   OS                : macOS Sierra
   Xcode             : Xcode 9.2 Build version 9C40b

Here's the exact error:

* 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.

If I remove the either plugin phonegap-plugin-barcodescanner or cordova-plugin-firebase-analytics then everything builds as expected just not together.

@davidquon
Copy link

This looks like a duplicate of #119.

@davidquon
Copy link

This seemed to help me work with Version 3 which is using Android X dependencies.
#119 (comment)

@SimonBrazell
Copy link

Use version cordova-plugin-firebase-analytics@2.0.4 and the project builds with no errors on cordova-android@8.1.0.

@sebastianovide
Copy link

same here... it breaks on 3 but it work on 2

@chemerisuk
Copy link
Owner

Duplicates #130

@nuryagdym
Copy link

Solved by installing
$ ionic cordova plugin add cordova-plugin-androidx $ ionic cordova plugin add cordova-plugin-androidx-adapter

as described in this comment

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

6 participants