Follow the advice Gradle gives you at the end of the build. In my case it told me to 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'
}
// ...
}
More Related Contents:
- Android Gradle plugin 0.7.0: “duplicate files during packaging of APK”
- “No cached version… available for offline mode.”
- Android- Error:Execution failed for task ‘:app:transformClassesWithDexForRelease’
- How to configure gradle to work “offline” (using cached dependencies)
- “Gradle Version 2.10 is required.” Error
- Android Studio: Gradle – build fails — Execution failed for task ‘:dexDebug’
- Why are there two build.gradle files in an Android Studio project?
- Android Studio Error “Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8”
- Android Gradle Apache HttpClient does not exist?
- Android Studio: Gradle sync failed: Could not HEAD ‘…’. Received status code 502 from server: Bad Gateway [closed]
- How to create an Android Library Jar with gradle without publicly revealing source code?
- how can I add the aidl file to Android studio (from the in-app billing example)
- Android Studio Gradle issue upgrading to version 0.5.0 – Gradle Migrating From 0.8 to 0.9 – Also Android Studio upgrade to 0.8.1
- Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to
- Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml
- How to automatically uninstall android app from device before installing a new version
- Upgraded to Android studio 3.4 – Aapt2InternalException: AAPT2: Daemon startup failed
- no cached version available for offline mode
- Gradle Duplicate Entry: java.util.zip.ZipException
- How to include a library module dependency in an Android Studio project?
- Unable to resolve dependency for ‘:app@debug/compileClasspath’: Could not resolve com.android.support:appcompat-v7:26.1.0
- Configuration with name ‘default’ not found. Android Studio
- Android Studio: how to generate signed APK using Gradle?
- Android Studio and Gradle build error
- Gradle error upgrading to Android Studio 3.0 Beta 1
- Android Gradle DexException: Multiple dex files define Lorg/hamcrest/Description
- After update android studio could not create parent directory for lock file
- Could not find property ‘outputFile’ on com.android.build.gradle.internal.api.ApplicationVariantImpl
- Can an AAR include transitive dependencies? [duplicate]
- Android build gradle is too slow (Dependency Resolution)