triniwiz / nativescript-downloader

Apache License 2.0
32 stars 18 forks source link

Android build fails with DexArchiveMergerException #23

Closed lini closed 5 years ago

lini commented 6 years ago

Using the current CLI version 4.2.0 I get the following errors in the console during gradle build:

Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: ...

Steps to reproduce:

tns create testapp
cd testapp/
tns plugin add nativescript-downloader
tns build android

How to fix - the build is OK after I add compile 'com.android.support:design:27.1.0' in the include.gradle file of the plugin (in platforms/andrdoid/include.gradle):

repositories {
    maven {
        url 'https://maven.google.com'
    }
}

dependencies {
    compile 'co.fitcom:fancydownloader:0.+'
    compile 'com.android.support:design:27.1.0'
}
pasquiermichael commented 5 years ago

Hi, Thank you this solution works for me aswell, you can also (not the best solution but still) put it directly in your project app.gradle (so you don't have to put it again everytime you remove/add android platform).