Android Studio buildbox错误java.util.zip.ZipException:重复条目:android / support / v4 / print / PrintHelper $ PrintHelperStubImpl.class

时间:2017-08-11 11:06:20

标签: android android-studio duplicates android-support-library android-multidex

嘿,当我尝试在android上构建我的apk时我得到了这个错误我不知道这意味着你能帮助我吗? :

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/print/PrintHelper$PrintHelperStubImpl.class

这是我的build.gradle文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
    applicationId "com.frgg.apps.thetri"
    minSdkVersion 14
    targetSdkVersion 23
    multiDexEnabled true
 dexOptions {
        javaMaxHeapSize "4g"
    }

    ndk {
        moduleName "player_shared"
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
sourceSets.main {
    jni.srcDirs = []// <-- disable automatic ndk-build call
}
productFlavors {
}
}
dependencies {
compile('com.google.android.gms:play-services:+') { exclude module: 'support-v4' }
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/support-v4-19.0.1.jar')

}

在gradle sync期间不会显示错误。但是当我尝试构建apk时出现

可能是什么问题?

修改

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
  

com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:执行时出错带有参数的主要类com.android.dx.command.Main的java进程{--dex --num-threads = 4 --multi-dex --main-dex-list C:\ Users \ hotrod \ Desktop \ APPS \ android5 \ app \ build \ intermediates \ multi-dex \ debug \ maindexlist.txt --output C:\ Users \ hotrod \ Desktop \ APPS \ android5 \ app \ build \ intermediates \ transforms \ dex \ debug \ folders \ 1000 \ 1f \ main C:\ Users \ hotrod \ Desktop \ APPS \ android5 \ app \ build \ intermediates \ transforms \ jarMerging \ debug \ jars \ 1 \ 1f \ combined.jar}

0 个答案:

没有答案