Sup*_*tik 13 android proguard gradle android-studio
我一直在使用Gradle Android插件v0.12,但我决定升级到新版本,因为我需要新的功能(并且改进的速度总是一个加号).
在更新到新的v0.13.1之后,我继续获得"重复Zip输入"(来自Proguard),而之前一切正常.完整的错误:
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条目[commons-io-1.3.2.jar:org/apache/commons/io/CopyUtils.class]))(之前的CopyUtils是FileUtils).
我正在使用以下包装选项: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'
}
Run Code Online (Sandbox Code Playgroud)
你可以告诉我,我正在排除清单文件......
只是为了测试它,我改回了版本0.12.0并且一切都再次工作,回到0.13.*它打破了(但我需要0.13.*)!
此外,我正在使用以下库:
有人也遇到过这个问题吗?如果是这样,任何人都可以帮助我(现在已经在这个问题上打了两天头脑!)?谢谢!
Gaë*_*tan 15
更新到Android Gradle插件0.13时,我遇到了同样的问题.我设法通过retrofit
在我的build.gradle
文件中包含这种方式来修复它:
compile('com.squareup.retrofit:retrofit:1.6.1') {
exclude group: 'commons-io', module: 'commons-io'
}
Run Code Online (Sandbox Code Playgroud)
编辑:并且可以一次完成所有retrofit
和robospice
依赖:
compile('com.octo.android.robospice:robospice-retrofit:1.4.14') {
exclude group: 'commons-io', module: 'commons-io'
}
Run Code Online (Sandbox Code Playgroud)
它会自动获得所有潜在的依赖性(retrofit
,robospice-core
,robospice-cache
,...).
CjS*_*CjS 15
我遇到过同样的问题.在我的情况下,我没有做几个月的构建,并发现依赖 compile 'org.apache.commons:commons-io:1.3.2'
不再有效(虽然我猜这些罐子仍在我的本地存储库中).
一旦我改变它 compile 'commons-io:commons-io:1.3.2'
,proGuard运行良好.
归档时间: |
|
查看次数: |
10475 次 |
最近记录: |