EddyVerbruggen / SocialSharing-PhoneGap-Plugin

πŸ‘¨β€β€οΈβ€πŸ’‹β€πŸ‘¨ Cordova plugin to share text, a file (image/PDF/..), or a URL (or all three) via the native sharing widget
MIT License
1.78k stars 904 forks source link

D8: Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal #1119

Open breshman opened 3 years ago

breshman commented 3 years ago

Please help

[cordova] D8: Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal [cordova] [cordova] FAILURE: Build failed with an exception. [cordova] [cordova] What went wrong: [cordova] Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. [cordova] > com.android.build.api.transform.TransformException: Error while generating the main dex list: [cordova] Error while merging dex archives: [cordova] Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. [cordova] Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal [cordova] [cordova] Try: [cordova] 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. [cordova] [cordova] Get more help at https://help.gradle.org [cordova] [cordova] BUILD FAILED in 14s [cordova] C:...\platforms\android\gradlew: Command failed with exit code 1 Error output: [cordova] D8: Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal [cordova] [cordova] FAILURE: Build failed with an exception. [cordova] [cordova] What went wrong: [cordova] Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. [cordova] > com.android.build.api.transform.TransformException: Error while generating the main dex list: [cordova] Error while merging dex archives: [cordova] Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. [cordova] Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal [cordova] [cordova] Try: [cordova] 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. [cordova] [cordova] Get more help at https://help.gradle.org [cordova] [cordova] BUILD FAILED in 14s

Tarekajaj commented 3 years ago

Same issue, did you know the cause of this?

Tarekajaj commented 3 years ago

adding following plugins

cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter

solved the problem for me

breshman commented 3 years ago

It worked, thanks πŸ‘ πŸ‘ πŸ‘ πŸ‘ πŸ‘

tinemlakar commented 3 years ago

Did not work for me on phoengap build 😒

faugusztin commented 3 years ago

In case of Phonegap, you either needs to manually replace all imports in your own fork or abandon Phonegap - which you would have to do anyway, as Phonegap build service is going away on Oct 1 2020.

tinemlakar commented 3 years ago

Solved it by downgrading cordova-plugin-x-socialsharing to version 5.6.8. Tnx.

gihan667 commented 3 years ago

adding following plugins

cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter

solved the problem for me

this solved the issue, thanks πŸ‘ πŸ‘

codebuzviraj commented 3 years ago

adding following plugins

cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter

solved the problem for me

it work for me

GianLucaFinelli commented 2 years ago

It did not work for me, something else that could be causing it?