Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Using with Joda-Time #141

Closed
johnkil opened this issue Apr 7, 2015 · 1 comment
Closed

Using with Joda-Time #141

johnkil opened this issue Apr 7, 2015 · 1 comment

Comments

@johnkil
Copy link

johnkil commented Apr 7, 2015

I have error compiling project

Error:duplicate files during packaging of APK /Users/johnkil/Drive/Development/Freelance/ByTheWay/app/build/outputs/apk/app-debug-unaligned.apk
    Path in archive: META-INF/LICENSE.txt
    Origin 1: /Users/johnkil/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.7/b321fd17a60912973a8344da427487c65ccbb552/joda-time-2.7-no-tzdb.jar
    Origin 2: /Users/johnkil/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.2/2bf96b7aa8b611c177d329452af1dc933e14501c/commons-cli-1.2.jar
You can ignore those files in your build.gradle:
    android {
      packagingOptions {
        exclude 'META-INF/LICENSE.txt'
      }
    }
Error:Execution failed for task ':app:packageDebug'.
> Duplicate files copied in APK META-INF/LICENSE.txt
    File 1: /Users/johnkil/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.7/b321fd17a60912973a8344da427487c65ccbb552/joda-time-2.7-no-tzdb.jar
    File 2: /Users/johnkil/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.7/b321fd17a60912973a8344da427487c65ccbb552/joda-time-2.7-no-tzdb.jar

build.gradle

dependencies {
    compile 'net.danlew:android.joda:2.7.1'

    compile 'com.facebook.stetho:stetho:1.1.0'
    compile 'com.facebook.stetho:stetho-okhttp:1.1.0'
}
@johnkil
Copy link
Author

johnkil commented Apr 7, 2015

Using next code fixed this issue

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

@jasta jasta closed this as completed Apr 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants