摇篮插件v0.13.1后重复ZIP条目 [英] Duplicate Zip Entry after Gradle Plugin v0.13.1

查看:187
本文介绍了摇篮插件v0.13.1后重复ZIP条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用的摇篮Android插件v0.12但我决定升级到新的版本,因为我需要的新功能(和改进的速度始终是一个加号)。

I've been using the Gradle Android plugin v0.12 but I decided to upgrade to the new version, because I needed the new functionality (and the improved speed is always a plus).

更新到新v0.13.1后,我不断收到重复ZIP条目(从Proguard的),而之前的一切工作。完整的错误:

After updating to the new v0.13.1, I keep getting the "Duplicate Zip Entry" (from Proguard) while everything worked before. The full error:

产生java.io.IOException:无法写入[/Users/.../classes-proguard/netherlands/release/classes.jar](看不懂[/Users/.../.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae969985dae5/commons-io-1.3.2.jar(;;;;;;!META-INF/MANIFEST.MF)] (重复的ZIP条目[公地IO-1.3.2.jar:组织/阿帕奇/公/ IO / CopyUtils.class])。)(CopyUtils是文件实用程序之前)

java.io.IOException: Can't write [/Users/.../classes-proguard/netherlands/release/classes.jar] (Can't read [/Users/.../.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae969985dae5/commons-io-1.3.2.jar(;;;;;;!META-INF/MANIFEST.MF)] (Duplicate zip entry [commons-io-1.3.2.jar:org/apache/commons/io/CopyUtils.class])) (CopyUtils was FileUtils before).

我用下面的包装选项:packagingOptions

I'm using following packaging options: packagingOptions

{ 
   exclude 'AndroidManifest.xml' 
   exclude 'META-INF/DEPENDENCIES' 
   exclude 'META-INF/notice.txt' 
   exclude 'META-INF/license.txt' 
   exclude 'META-INF/LICENSE.txt' 
   exclude 'META-INF/NOTICE.txt' 
   exclude 'META-INF/MANIFEST.MF' 
   exclude '!META-INF/MANIFEST.MF' 
   exclude 'META-INF/services/javax.annotation.processing.Processor' 
}

正如你所知道的,我不包括清单文件...

As you can tell, I'm excluding the manifest files...

只是为了测试它,我改回0.12.0版本,一切工作再次回到0.13。*和它打破了(但我需要0.13。*)!

Just to test it, I changed back to version 0.12.0 and everything works again, back to 0.13.* and it breaks (but I need 0.13.*)!

另外,我使用了以下库:

Further, I'm using the following libraries:

  1. Robospice
  2. 在改造
  3. OkHttp
  4. 飞镖
  5. ICEPICK
  6. Butterknife
  7. Crouton
  8. SmoothProgressBar
  9. NineoldsAndroid(在BetterPickers库)

有没有人遇到这个问题呢?如果是的话,任何人都可以请帮我(打破了我的头2天就这个问题吧!)?谢谢!

Did anyone encounter this issue too? If so, can anyone please help me out (been breaking my head for 2 days on this issue now!)? Thanks!

推荐答案

我更新到Android摇篮插件0.13时有同样的问题。我设法通过包括加装就这样在我的 build.gradle 文件来解决它:

I had the same issue when updating to Android Gradle plugin 0.13. I managed to fix it by including retrofit this way in my build.gradle file:

compile('com.squareup.retrofit:retrofit:1.6.1') {
    exclude group: 'commons-io', module: 'commons-io'
}

编辑:,并可以做到这一点对所有的加装 robospice dependcies一次有:

And can do this on all retrofit and robospice dependcies at once with:

compile('com.octo.android.robospice:robospice-retrofit:1.4.14') {
    exclude group: 'commons-io', module: 'commons-io'
}

它会自动获得所有潜在的依赖关系(改装 robospice核 robospice -cache ,...)。

这篇关于摇篮插件v0.13.1后重复ZIP条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆