Android Studio: Duplicate files copied in APK META-INF/DEPENDENCIES when compile

While Scott Barta’s answer is correct, is lacks a simple and common solution: just add

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}

to your build.gradle to ignore those duplicates.

Leave a Comment