I have been working on the following problem for several hours, but have not come up with a way to solve my problem. I tried the following fixes from Qaru ( Updating Android Studio to 1.0 corrupts MultiDex and Duplicate Zip entry after Gradle Plug-in v0.13.1 ), but none of them worked.
When trying to create my program, the following error occurs:
Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: org/apache/commons/io/CopyUtils.class
It seems like an error indicates that commons-io is included twice in the build process
I use Android Studio and Gradle to include several Robospice dependencies. This is the dependency section of my Gradle build file:
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile'com.google.api-client:google-api-client-android:1.19.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.jakewharton:butterknife:${butterknifeVersion}"
compile 'com.sun.jersey:jersey-bundle:1.8'
compile 'com.google.code.gson:gson:2.3'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.0'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.0'
compile ('com.octo.android.robospice:robospice:1.4.14'){
exclude module: 'commons-io'
exclude group: 'commons-io'
}
compile ('com.octo.android.robospice:robospice-spring-android:1.4.14'){
exclude group: 'org.apache.commons', module: 'commons-io'
}
compile 'com.squareup.okhttp:okhttp:2.1.0'
compile ('com.octo.android.robospice:robospice-google-http-client:1.4.14'){
exclude module: 'xpp3'
exclude group: 'stax'
}
compile 'org.scribe:scribe:1.3.5'
compile files("$buildDir/native-libs/native-libs.jar")
}
" gradlew -q: " , com.octo.android.robospice: robospice: 1.4.14 commons-io. :
+
| \
| +
| \
| \
- , commons-io Robospice Gradle. commons-io org.apache.commons, .
, , , .