com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目

时间:2015-12-07 04:41:52

标签: android

apply plugin: 'com.android.application'

dependencies {

    compile fileTree(include: '*.jar', dir: 'libs')
    compile project(':slide-menu-library')
    compile project(':ScoinGameSDK_Lib')
    compile project(':PhotoCropCircleLib')
    compile files('libs/httpclient-4.3.6.jar')

    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.google.android.gms:play-services:8.3.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services-ads:8.3.0'
    compile 'com.google.android.gms:play-services-identity:8.3.0'
    compile 'com.google.android.gms:play-services-gcm:8.3.0'
}
android {

    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
    packagingOptions {
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
    }
    dexOptions {
        javaMaxHeapSize "4g"
        preDexLibraries = false
        incremental true
    }
    defaultConfig {
        multiDexEnabled true
    }
}

以下日志:

Information:Gradle tasks [:TADISwatch:assembleDebug]
:FacebookSDK:preBuild UP-TO-DATE
:FacebookSDK:preReleaseBuild UP-TO-DATE
:FacebookSDK:compileReleaseNdk UP-TO-DATE
:FacebookSDK:compileLint
:FacebookSDK:copyReleaseLint UP-TO-DATE
:FacebookSDK:mergeReleaseProguardFiles UP-TO-DATE
:FacebookSDK:packageReleaseRenderscript UP-TO-DATE
:FacebookSDK:checkReleaseManifest
:FacebookSDK:prepareReleaseDependencies
:FacebookSDK:compileReleaseRenderscript UP-TO-DATE
:FacebookSDK:generateReleaseResValues UP-TO-DATE
:FacebookSDK:generateReleaseResources UP-TO-DATE
:FacebookSDK:packageReleaseResources UP-TO-DATE
:FacebookSDK:compileReleaseAidl UP-TO-DATE
:FacebookSDK:generateReleaseBuildConfig UP-TO-DATE
:FacebookSDK:generateReleaseAssets UP-TO-DATE
:FacebookSDK:mergeReleaseAssets UP-TO-DATE
:FacebookSDK:processReleaseManifest UP-TO-DATE
:FacebookSDK:processReleaseResources UP-TO-DATE
:FacebookSDK:generateReleaseSources UP-TO-DATE
:FacebookSDK:compileReleaseJavaWithJavac UP-TO-DATE
:FacebookSDK:processReleaseJavaRes UP-TO-DATE
:FacebookSDK:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:FacebookSDK:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:FacebookSDK:mergeReleaseJniLibFolders UP-TO-DATE
:FacebookSDK:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:FacebookSDK:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:FacebookSDK:bundleRelease UP-TO-DATE
:PhotoCropCircleLib:preBuild UP-TO-DATE
:PhotoCropCircleLib:preReleaseBuild UP-TO-DATE
:PhotoCropCircleLib:compileReleaseNdk UP-TO-DATE
:PhotoCropCircleLib:compileLint
:PhotoCropCircleLib:copyReleaseLint UP-TO-DATE
:PhotoCropCircleLib:checkReleaseManifest
:PhotoCropCircleLib:preDebugAndroidTestBuild UP-TO-DATE
:PhotoCropCircleLib:preDebugBuild UP-TO-DATE
:PhotoCropCircleLib:preDebugUnitTestBuild UP-TO-DATE
:PhotoCropCircleLib:preReleaseUnitTestBuild UP-TO-DATE
:PhotoCropCircleLib:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:PhotoCropCircleLib:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:PhotoCropCircleLib:prepareReleaseDependencies
:PhotoCropCircleLib:compileReleaseAidl UP-TO-DATE
:PhotoCropCircleLib:compileReleaseRenderscript UP-TO-DATE
:PhotoCropCircleLib:generateReleaseBuildConfig UP-TO-DATE
:PhotoCropCircleLib:generateReleaseAssets UP-TO-DATE
:PhotoCropCircleLib:mergeReleaseAssets UP-TO-DATE
:PhotoCropCircleLib:generateReleaseResValues UP-TO-DATE
:PhotoCropCircleLib:generateReleaseResources UP-TO-DATE
:PhotoCropCircleLib:mergeReleaseResources UP-TO-DATE
:PhotoCropCircleLib:processReleaseManifest UP-TO-DATE
:PhotoCropCircleLib:processReleaseResources UP-TO-DATE
:PhotoCropCircleLib:generateReleaseSources UP-TO-DATE
:PhotoCropCircleLib:compileReleaseJavaWithJavac UP-TO-DATE
:PhotoCropCircleLib:extractReleaseAnnotations UP-TO-DATE
:PhotoCropCircleLib:mergeReleaseProguardFiles UP-TO-DATE
:PhotoCropCircleLib:packageReleaseRenderscript UP-TO-DATE
:PhotoCropCircleLib:packageReleaseResources UP-TO-DATE
:PhotoCropCircleLib:processReleaseJavaRes UP-TO-DATE
:PhotoCropCircleLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:PhotoCropCircleLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:PhotoCropCircleLib:mergeReleaseJniLibFolders UP-TO-DATE
:PhotoCropCircleLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:PhotoCropCircleLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:PhotoCropCircleLib:bundleRelease UP-TO-DATE
:ScoinGameSDK_Lib:preBuild UP-TO-DATE
:ScoinGameSDK_Lib:preReleaseBuild UP-TO-DATE
:ScoinGameSDK_Lib:compileReleaseNdk UP-TO-DATE
:ScoinGameSDK_Lib:compileLint
:ScoinGameSDK_Lib:copyReleaseLint UP-TO-DATE
:ScoinGameSDK_Lib:checkReleaseManifest
:ScoinGameSDK_Lib:preDebugAndroidTestBuild UP-TO-DATE
:ScoinGameSDK_Lib:preDebugBuild UP-TO-DATE
:ScoinGameSDK_Lib:preDebugUnitTestBuild UP-TO-DATE
:ScoinGameSDK_Lib:preReleaseUnitTestBuild UP-TO-DATE
:ScoinGameSDK_Lib:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComAndroidSupportSupportV42220Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServices830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesAds830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesAppindexing830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesAppinvite830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesAppstate830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesCast830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesDrive830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesFitness830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesGames830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesIdentity830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesNearby830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesPanorama830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesSafetynet830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesVision830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesWallet830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareComGoogleAndroidGmsPlayServicesWearable830Library UP-TO-DATE
:ScoinGameSDK_Lib:prepareTadiFacebookSDKUnspecifiedLibrary UP-TO-DATE
:ScoinGameSDK_Lib:prepareReleaseDependencies
:ScoinGameSDK_Lib:compileReleaseAidl UP-TO-DATE
:ScoinGameSDK_Lib:compileReleaseRenderscript UP-TO-DATE
:ScoinGameSDK_Lib:generateReleaseBuildConfig UP-TO-DATE
:ScoinGameSDK_Lib:generateReleaseAssets UP-TO-DATE
:ScoinGameSDK_Lib:mergeReleaseAssets UP-TO-DATE
:ScoinGameSDK_Lib:generateReleaseResValues UP-TO-DATE
:ScoinGameSDK_Lib:generateReleaseResources UP-TO-DATE
:ScoinGameSDK_Lib:mergeReleaseResources UP-TO-DATE
:ScoinGameSDK_Lib:processReleaseManifest UP-TO-DATE
:ScoinGameSDK_Lib:processReleaseResources UP-TO-DATE
:ScoinGameSDK_Lib:generateReleaseSources UP-TO-DATE
:ScoinGameSDK_Lib:compileReleaseJavaWithJavac UP-TO-DATE
:ScoinGameSDK_Lib:extractReleaseAnnotations UP-TO-DATE
:ScoinGameSDK_Lib:mergeReleaseProguardFiles UP-TO-DATE
:ScoinGameSDK_Lib:packageReleaseRenderscript UP-TO-DATE
:ScoinGameSDK_Lib:packageReleaseResources UP-TO-DATE
:ScoinGameSDK_Lib:processReleaseJavaRes UP-TO-DATE
:ScoinGameSDK_Lib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:ScoinGameSDK_Lib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:ScoinGameSDK_Lib:mergeReleaseJniLibFolders UP-TO-DATE
:ScoinGameSDK_Lib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:ScoinGameSDK_Lib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:ScoinGameSDK_Lib:bundleRelease UP-TO-DATE
:TADISwatch:preBuild UP-TO-DATE
:TADISwatch:preDebugBuild UP-TO-DATE
:TADISwatch:checkDebugManifest
:TADISwatch:preReleaseBuild UP-TO-DATE
:slide-menu-library:preBuild UP-TO-DATE
:slide-menu-library:preReleaseBuild UP-TO-DATE
:slide-menu-library:compileReleaseNdk UP-TO-DATE
:slide-menu-library:compileLint
:slide-menu-library:copyReleaseLint UP-TO-DATE
:slide-menu-library:mergeReleaseProguardFiles UP-TO-DATE
:slide-menu-library:packageReleaseRenderscript UP-TO-DATE
:slide-menu-library:checkReleaseManifest
:slide-menu-library:prepareReleaseDependencies
:slide-menu-library:compileReleaseRenderscript UP-TO-DATE
:slide-menu-library:generateReleaseResValues UP-TO-DATE
:slide-menu-library:generateReleaseResources UP-TO-DATE
:slide-menu-library:packageReleaseResources UP-TO-DATE
:slide-menu-library:compileReleaseAidl UP-TO-DATE
:slide-menu-library:generateReleaseBuildConfig UP-TO-DATE
:slide-menu-library:generateReleaseAssets UP-TO-DATE
:slide-menu-library:mergeReleaseAssets UP-TO-DATE
:slide-menu-library:processReleaseManifest UP-TO-DATE
:slide-menu-library:processReleaseResources UP-TO-DATE
:slide-menu-library:generateReleaseSources UP-TO-DATE
:slide-menu-library:compileReleaseJavaWithJavac UP-TO-DATE
:slide-menu-library:processReleaseJavaRes UP-TO-DATE
:slide-menu-library:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:slide-menu-library:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:slide-menu-library:mergeReleaseJniLibFolders UP-TO-DATE
:slide-menu-library:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:slide-menu-library:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:slide-menu-library:bundleRelease UP-TO-DATE
:TADISwatch:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:TADISwatch:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
:TADISwatch:preDebugAndroidTestBuild UP-TO-DATE
:TADISwatch:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:TADISwatch:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServices830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesAds830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesAppindexing830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesAppinvite830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesAppstate830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesCast830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesDrive830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesFitness830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesGames830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesIdentity830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesNearby830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesPanorama830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesSafetynet830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesVision830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesWallet830Library UP-TO-DATE
:TADISwatch:prepareComGoogleAndroidGmsPlayServicesWearable830Library UP-TO-DATE
:TADISwatch:prepareTadiFacebookSDKUnspecifiedLibrary UP-TO-DATE
:TADISwatch:prepareTadiPhotoCropCircleLibUnspecifiedLibrary UP-TO-DATE
:TADISwatch:prepareTadiScoinGameSDK_LibUnspecifiedLibrary UP-TO-DATE
:TADISwatch:prepareTadiSlideMenuLibraryUnspecifiedLibrary UP-TO-DATE
:TADISwatch:prepareDebugDependencies
:TADISwatch:compileDebugAidl UP-TO-DATE
:TADISwatch:compileDebugRenderscript UP-TO-DATE
:TADISwatch:generateDebugBuildConfig UP-TO-DATE
:TADISwatch:generateDebugAssets UP-TO-DATE
:TADISwatch:mergeDebugAssets UP-TO-DATE
:TADISwatch:generateDebugResValues UP-TO-DATE
:TADISwatch:generateDebugResources UP-TO-DATE
:TADISwatch:mergeDebugResources UP-TO-DATE
:TADISwatch:processDebugManifest UP-TO-DATE
:TADISwatch:processDebugResources UP-TO-DATE
:TADISwatch:generateDebugSources UP-TO-DATE
:TADISwatch:compileDebugJavaWithJavac UP-TO-DATE
:TADISwatch:compileDebugNdk UP-TO-DATE
:TADISwatch:compileDebugSources UP-TO-DATE
:TADISwatch:transformClassesWithJarMergingForDebug FAILED
Error:Execution failed for task ':TADISwatch:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/ArrayRes.class

1 个答案:

答案 0 :(得分:0)

使用

  

./ gradlew app:dependencies

显示项目的依赖项,并按exclude删除重复的jar / aar依赖项,如下所示:

  

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{           排除组:'com.android.support',模块:'support-annotations'       })