Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
Closed this issue · 2 comments
When bioth "js-service" and "cordova-plugin-request-location-accuracy" is used then
error occur in build:
:app:compileDebugSources
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
This error is caused by a Gradle version collision i.e. different plugins specifying different library versions.
This plugin specifies v11.+
of the Play Services Library as a Gradle reference, however the requested version can be overridden using cordova-android-play-services-gradle-release.
The js-service
plugin bundles a bunch hard-coded libraries, include the Android Support library which is a bad idea as they will inevitably version-clash with other plugins (such as this one) and there is no way to determine/override the versions of their dependencies.
So in a nutshell, this is an issue with js-service
, not this plugin. I see you've raised this issues against that issue tracker which is good, since the issue needs to be solved there.
thanks for your comment