Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'java.util.zip.ZipException: duplicate entry:' after Proguard #554

Closed
astroluj opened this issue Nov 10, 2016 · 1 comment
Closed

'java.util.zip.ZipException: duplicate entry:' after Proguard #554

astroluj opened this issue Nov 10, 2016 · 1 comment

Comments

@astroluj
Copy link

astroluj commented Nov 10, 2016

Hi, i need you helpㅠㅠ
An error occurs after applying Pro Guard.
I write proguard-rule.
it referenced https://github.com/bytedeco/javacv/wiki/Configuring-Proguard-for-JavaCV

My project appeared mulidex.
Therefore added 'multiDexEnabled true' and 'compile 'com.android.support:multidex:1.0.1',
'android:name="android.support.multidex.MultiDexApplication"'.

My project works fine on Android machine version over 5.0.
But, under 5.0

Error content is it.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/bytedeco/javacpp/flandmark$FLANDMARK_Options.class

how i do?

This is the piece of 'build.grade' on my project
AAR build.gradle

// Duplication library file exception
    packagingOptions {
        exclude 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.properties'
        exclude 'META-INF/maven/org.bytedeco.javacpp-presets/flandmark/pom.properties'
        exclude 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.xml'
        exclude 'META-INF/maven/org.bytedeco.javacpp-presets/flandmark/pom.xml'
    }
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:support-annotations:25.0.0'
    testCompile 'junit:junit:4.12'
    compile project(':openCVLibrary310')
    compile files('src/main/libs/snakeyaml-1.9.jar')
    compile files('src/main/libs/opencv.jar')
    compile files('src/main/libs/javacpp.jar')
    compile files('src/main/libs/flandmark.jar')
    compile files('src/main/libs/livedetect.jar')
    compile files('src/main/libs/ksoap2-android-assembly-3.4.0-jar-with-dependencies.jar')
}

Project build.gradle
livenessLibrary145 is AAR

dependencies {
    compile 'com.android.support:support-v4:25.0.0'
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:design:25.0.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'junit:junit:4.12'
    compile project(':livenessLibrary145')
    compile project(':openCVLibrary310')
    compile files('src/main/libs/poi-3.15.jar')
}
@saudet
Copy link
Member

saudet commented Nov 11, 2016

Duplicate of #353

@saudet saudet closed this as completed Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants