Proguard Gradle复制罐

时间:2015-09-22 10:28:08

标签: android gradle jar android-proguard

我有一个依赖于两个不同模块的android项目。

两个模块都需要相同的两个jar库。模块的配置如下:

dependencies {
    compile fileTree(include: '*.jar', exclude: 'android-support-v4.jar', dir: 'libs')
    compile 'com.android.support:support-v4:18.0.+'
    compile files('libs/lib1.jar')
    compile files('libs/lib2.jar')
}

当我使用proguard构建主项目时,我收到错误:

java.io.IOException:重复的zip条目[...... class]

有没有办法只包含一次JAR并避免错误?

1 个答案:

答案 0 :(得分:0)

尝试更改dep树

你有:

B - > A< -C

请:

A&lt; -B < - C

所以只有C才会明确地依赖于那些罐子。

相关问题