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

FAILURE: Build failed with an exception when using "cordova-plugin-twilio-video" in Ionic 3 #13

Closed
Malini-creator opened this issue Mar 12, 2020 · 5 comments

Comments

@Malini-creator
Copy link

Hi,
I want to implement the video call functionality in my ionic project. I'm trying to use cordova-plugin-twilio-video (https://github.com/okode/cordova-plugin-twilio-video) in Ionic 3. I'm facing issue when running the android build. Provided project has been created using capacitor. How can I use this in cordova?

Below is the error I'm getting when running the build
D8: Program type already present: android.support.design.widget.CoordinatorLayout$Behavior

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

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.
Program type already present: android.support.design.widget.CoordinatorLayout$Behavior

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 13s

Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
34 actionable tasks: 8 executed, 26 up-to-date
C:\Users\softsuave\Desktop\HealthCare-Web\platforms\android\gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
D8: Program type already present: android.support.design.widget.CoordinatorLayout$Behavior

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

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.
Program type already present: android.support.design.widget.CoordinatorLayout$Behavior

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 13s
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.
@adet4ever
Copy link

Any update on this issue?

@MosheNaftali
Copy link

@Malini-creator You found a solution?

@shero4
Copy link

shero4 commented May 22, 2020

any updates?

@neerajsaxena0711
Copy link

I had similar issue on ionic 5, tried these 2 plugins and then it worked -

add plugin to enable AndroidX in the project

cordova plugin add cordova-plugin-androidx

add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX

cordova plugin add cordova-plugin-androidx-adapter

You can try adding these and check.

@rpanadero
Copy link
Member

It seems that some plugin or native dependency brings some AndroidX dependency to your project and this plugin is not directly compatible with AndroidX. You must migrate the plugin code to AndroidX.

Doing what @neerajsaxena0711 says here if you are working in a Cordova project: #13 (comment)

Or using Jetifier if you are using this plugin in a Capacitor project:
https://github.com/mikehardy/jetifier

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