Skip to content Skip to sidebar Skip to footer

Error:execution Failed For Task ':java.util.zip.zipexception: Duplicate Entry: Org/apache/commons/io/copyutils.class

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:

Solution 1:

There is more than one dependency you have integrated which uses Apache Commons. just exclude them using following code in gradle.

compile('YOUR_DEPENDENCY') {
    exclude module: 'commons-io'
}

Solution 2:

Found the solution for this issue . You need to exclude common-io from your app build.gradle .

android {
    configurations{
        all*.exclude module: 'commons-io'
    }
}

Solution 3:

Techierj answer is correct, but it will also exclude commons-io:2.4, and in my case I needed that. So you can exclude by specific group:

compile('YOUR_DEPENDENCY') {
    exclude group: 'org.apache.commons', module: 'commons-io'
}

This will only exclude version 1.3.2 from org.apache.commons, and will mantain commons.io:commons.io:2.4

Post a Comment for "Error:execution Failed For Task ':java.util.zip.zipexception: Duplicate Entry: Org/apache/commons/io/copyutils.class"