android - java.util.zip.ZipException : duplicate entry during packageAllDebugClassesForMultiDex

标签 android android-gradle-plugin android-support-library android-multidex

我不确定这个错误是什么意思。

Execution failed for task ':excelSior:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: android/support/v4/util/TimeUtils.class

我目前正在为我的库使用 android-support-v4.jar

dependencies {
    compile project(':addThisSDK')
    compile project(':centeredContentButton')
    compile project(':googleplayservices_lib')
    compile files('libs/adxtag2.4.6.jar')
    compile files('libs/android-support-v4.jar')
    compile files('libs/aws-android-sdk-1.7.1.1-debug.jar')
    compile files('libs/commons-lang-2.6.jar')
    compile files('libs/crittercism_v4_4_0_sdkonly.jar')
    compile files('libs/dd-plist.jar')
    compile files('libs/FiksuAndroidSDK_4.1.1.jar')
    compile files('libs/iqengines-sdk-barcode.jar')
    compile files('libs/irEventTracker-1.2.jar')
    compile files('libs/jolt-core-0.0.7.jar')
    compile files('libs/json-utils-0.0.7.jar')
    compile files('libs/jsoup-1.7.2.jar')
    compile files('libs/kooaba-api-v4-java.jar')
    compile 'com.android.support:multidex:1.0.0'
}

在 gradle sync 期间不会出现错误。就在我尝试运行应用程序时

可能是什么问题?

最佳答案

你现在可能已经解决了这个问题,但只是为了让这个问题不会一直没有答案, 尝试将此添加到您的 build.gradle:

configurations {
    all*.exclude group: 'com.android.support', module: 'support-v4'
}

关于android - java.util.zip.ZipException : duplicate entry during packageAllDebugClassesForMultiDex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41422851/

相关文章:

android - 应用程序在没有 stackTrace 的情况下旋转时崩溃

java - PagerTabStrip 无法解析为类型

android - GCM 使用两个不同的工作注册 ID 进行注册

android-studio - 如何在生成签名的 apk 之前运行测试?

android - 通过 USB 将数据从 android 发送到 PC

android - 编译应用程序时出错

firebase - 在最新检查期间无法捕获任务 ':app:preDebugBuild' 属性 'compileManifests' 的输入文件指纹

android - SwipeRefreshLayout 从 support21 force 到旧样式

android - 如何在android中为动画计时

Android Studio 失败并显示 : "File was deleted, but previous version not found in cache"