1

I have an android project that depends on two different Modules.

Both modules needs the same two jar libraries. The configuration of the modules is like:

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')
}

When I build the main project with proguard I get error:

java.io.IOException: Duplicate zip entry [......class]

Is there a way to include the JAR just once and avoid the error?

Panciz
  • 2,183
  • 2
  • 30
  • 54
  • See http://stackoverflow.com/questions/9279213/android-proguard-duplicate-zip-entry-error – leeor Sep 22 '15 at 21:18

1 Answers1

0

Try change dep tree

you have:

B -> A <- C

make:

A <- B <- C

so only C will explicitly depends on that jars.

vigilancer
  • 1,456
  • 14
  • 15