Hi Xavier,

Did you push 0.7.2? I still cannot solve this issue.

On Friday, December 20, 2013 12:14:35 PM UTC+11, Xavier Ducrohet wrote:
>
> ah that's because it's only for applications, not libraries, because 
> libraries don't package their dependencies.
>
> However test apps for libraries do... sigh. In my hurry to push a fix, I 
> forgot about that. I'll push a 0.7.2 tomorrow.
>
>
> On Thu, Dec 19, 2013 at 5:07 PM, Traun Leyden 
> <[email protected]<javascript:>
> > wrote:
>
>>
>> I am getting this error with Android Studio 0.4:
>>
>> Error: duplicate files during packaging of APK 
>> /Users/traun/Development/couchbase-lite-android/CouchbaseLiteProject/CBLite/build/apk/CBLite-debug-test-unaligned.apk
>> Path in archive: META-INF/ASL2.0
>>  Origin 1: 
>> /Users/traun/.gradle/caches/modules-2/files-2.1/org.codehaus.jackson/jackson-mapper-asl/1.9.2/95400a7922ce75383866eb72f6ef4a7897923945/jackson-mapper-asl-1.9.2.jar
>>  Origin 2: 
>> /Users/traun/.gradle/caches/modules-2/files-2.1/org.codehaus.jackson/jackson-core-asl/1.9.2/8493982bba1727106d767034bd0d8e77bc1931a9/jackson-core-asl-1.9.2.jar
>> You can ignore those files in your build.gradle:
>> android {
>>   packagingOptions {
>>     exclude 'META-INF/ASL2.0'
>>   }
>> }
>> :CBLite:packageDebugTest FAILED
>>
>>
>> and I tried adding the packagingOptions directive (here is my entire 
>> build.gradle file: https://gist.github.com/tleyden/8048897)
>>
>> but now it's giving me this error:
>>
>> * Where:
>> Build file 
>> '/Users/traun/Development/couchbase-lite-android/CouchbaseLiteProject/CBLite/build.gradle'
>>  
>> line: 38
>>
>> * What went wrong:
>> A problem occurred evaluating project ':CBLite'.
>> > Could not find method packagingOptions() for arguments 
>> [build_7e8h4gb29m24saphgjk26o3v1r$_run_closure3_closure10@6c80d028] on 
>> project ':CBLite'.
>>
>> * Try:
>> Run with --stacktrace option to get the stack trace. Run with --info or 
>> --debug option to get more log output.
>>
>> BUILD FAILED
>>
>>
>> Any ideas?
>>
>> On Thursday, December 19, 2013 3:24:52 PM UTC-8, Xavier Ducrohet wrote:
>>
>>> Glad to hear!
>>>
>>>
>>> On Thu, Dec 19, 2013 at 3:23 PM, Nicolas Milliard <[email protected]>wrote:
>>>
>>>> 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/ddb38c2be31deeb7a001177f7c3586
>>>> 65e350d646/dagger-compiler-1.1.0.jar
>>>>  Origin 2: /home/niqo/.gradle/caches/modules-2/files-2.1/com.
>>>> jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df
>>>> 7150397a78/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 <[email protected]> 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 <[email protected]
>>>>>>> > 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.annota
>>>>>>>> tion.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/ddb38c2be31de
>>>>>>>> eb7a001177f7c358665e350d646/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/f43b36925363701633d01
>>>>>>>> adb8e54df7150397a78/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/905075e6c80f206bbe6cf1e809
>>>>>>>>>>>> d2caa69f420c76/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 [email protected].
>>>>>>>>
>>>>>>>> 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 [email protected].
>>>>>> 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 [email protected].
>>>> 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 [email protected] <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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to