I update 0.7.1 and it failed at first with : 
-------------------------------------------------------------------
Error: duplicate files during packaging of APK 
app/build/apk/app-debug-unaligned.apk
Path in archive: META-INF/services/javax.annotation.processing.Processor
Origin 1: 
/home/niqo/.gradle/caches/modules-2/files-2.1/com.squareup.dagger/dagger-compiler/1.1.0/ddb38c2be31deeb7a001177f7c358665e350d646/dagger-compiler-1.1.0.jar
Origin 2: 
/home/niqo/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df7150397a78/butterknife-4.0.1.jar
You can ignore those files in your build.gradle:
android {
  packagingOptions {
    exclude 'META-INF/services/javax.annotation.processing.Processor'
  }
}
-------------------------------------------

Adding the recommanded build config worked!

Thanks for this fast fix.

niColas

On Thursday, December 19, 2013 2:52:03 PM UTC-8, Xavier Ducrohet wrote:
>
> That's all you need. MavenCentral may still be replicating, I'm not sure.
>
> I don't see the artifacts on search.maven.org but I was able to build the 
> samples (even after cleaning all of my local caches).
>
>
> On Thu, Dec 19, 2013 at 2:40 PM, David Shen <uas...@gmail.com<javascript:>
> > wrote:
>
>> Hey quick question; if I want to use 0.7.1, I just need to change
>>     dependencies {
>>         classpath 'com.android.tools.build:gradle:*0.7.0' -> 0.7.1*
>>     }
>>     
>> Or is there another step? I'm getting an 'artifact not found' error. 
>> Thanks! 
>>
>>
>> On Thursday, December 19, 2013 4:57:43 PM UTC-5, Xavier Ducrohet wrote:
>>
>>> oh that's going to be more difficult to deal with, maybe.
>>>
>>> I just pused 0.7.1 to central to allow ignore duplicate files, which 
>>> will not package either of them (which is fine for the typical LICENSE.txt 
>>> file).
>>>
>>> However in this case you have two implementations. If they are needed at 
>>> runtime, then you may not be able to use both libraries.
>>> If they are not needed then you'll be able to ignore META-INF/services/
>>> javax.annotation.processing.Processor and you'll be good.
>>>
>>>
>>> On Thu, Dec 19, 2013 at 11:44 AM, Nicolas Milliard <niq...@gmail.com>wrote:
>>>
>>>> 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-relea
>>>>>>>> se-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/b6dde38349ba9bb5e6ea6320531eae
>>>>>>>> 969985dae5/commons-io-1.3.2.jar
>>>>>>>
>>>>>>>  Origin 2: /Users/whatever/.gradle/caches/modules-2/files-2.1/org.
>>>>>>>> apache.commons/commons-lang3/3.1/905075e6c80f206bbe6cf1e809d2ca
>>>>>>>> a69f420c76/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/b6dde38349ba9bb5e6ea6320531eae
>>>>>>>> 969985dae5/commons-io-1.3.2.jar
>>>>>>>>   File 2: /Users/whatever/.gradle/caches/modules-2/files-2.1/
>>>>>>>> commons-io/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae
>>>>>>>> 969985dae5/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 adt-dev+u...@googlegroups.com.
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Xavier Ducrohet
>>> Android SDK Tech Lead
>>> Google Inc.
>>> http://developer.android.com | http://tools.android.com
>>>
>>> Please do not send me questions directly. Thanks! 
>>>
>>  -- 
>> 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 adt-dev+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
> http://developer.android.com | http://tools.android.com
>
> Please do not send me questions directly. Thanks! 
>

-- 
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 adt-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to