dpa99c / cordova-plugin-request-location-accuracy

Cordova/Phonegap plugin for Android and iOS to request enabling/changing of Location Services by triggering a native dialog
96 stars 62 forks source link

Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug' #46

Closed abhishek-kumar97 closed 6 years ago

abhishek-kumar97 commented 6 years ago

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

dpa99c commented 6 years ago

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.

abhishek-kumar97 commented 6 years ago

thanks for your comment