I have the same issue using Dagger and ButteKnife libraries that both use 
annotation processor:
[DEBUG] [org.gradle.api.Project] => 
META-INF/services/javax.annotation.processing.Processor
[ERROR] [org.gradle.api.Task] Error: duplicate files during packaging of 
APK /app/build/apk/app-debug-unaligned.apk
[ERROR] [org.gradle.api.Task] Path in archive: 
META-INF/services/javax.annotation.processing.Processor
[ERROR] [org.gradle.api.Task] Origin 1: 
.gradle/caches/modules-2/files-2.1/com.squareup.dagger/dagger-compiler/1.1.0/ddb38c2be31deeb7a001177f7c358665e350d646/dagger-compiler-1.1.0.jar
[ERROR] [org.gradle.api.Task] Origin 2: 
.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df7150397a78/butterknife-4.0.1.jar

Not sure how to workaround this.

Nicolas


On Thursday, December 19, 2013 5:15:25 AM UTC-8, Patrick Boos wrote:
>
> Current workaround from 
> https://code.google.com/p/android/issues/detail?id=61573#c19 :
>
> find ~/.gradle/caches/ -iname "*.jar" -exec zip -d '{}' 'META-INF/NOTICE*' \;
> find ~/.gradle/caches/ -iname "*.jar" -exec zip -d '{}' 'META-INF/LICENSE*' \;
>
>
> On Thursday, December 19, 2013 2:00:14 PM UTC+1, Patrick Boos wrote:
>>
>> Seems there is already a fix on the way for this:
>> https://code.google.com/p/android/issues/detail?id=61573#c14
>>
>> On Thursday, December 19, 2013 1:55:35 PM UTC+1, Patrick Boos wrote:
>>>
>>> Using commons-io-1.3.2.jar and commons-lang3-3.1.jar together seems to 
>>> break the build with the error message below.
>>>
>>> :app:packageRelease
>>>> Error: duplicate files during packaging of APK 
>>>> /Users/whatever/Development/whatever/app/build/apk/app-release-unaligned.apk
>>>
>>> Path in archive: META-INF/LICENSE.txt
>>>> Origin 1: 
>>>> /Users/whatever/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae969985dae5/commons-io-1.3.2.jar
>>>
>>> Origin 2: 
>>>> /Users/whatever/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.1/905075e6c80f206bbe6cf1e809d2caa69f420c76/commons-lang3-3.1.jar
>>>
>>> :app:packageRelease FAILED
>>>
>>>  
>>>
>>> FAILURE: Build failed with an exception. 
>>>
>>>
>>>> * What went wrong:
>>>> Execution failed for task ':app:packageRelease'.
>>>> > Duplicate files copied in APK META-INF/LICENSE.txt
>>>>   File 1: 
>>>> /Users/whatever/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae969985dae5/commons-io-1.3.2.jar
>>>>   File 2: 
>>>> /Users/whatever/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae969985dae5/commons-io-1.3.2.jar
>>>
>>>
>>> Any idea of a quick workaround to fix this?
>>>
>>> Cheers,
>>> Patrick 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to