ZipException:重复条目:android / support / annotation / AttrRes.class

时间:2015-10-20 13:17:50

标签: android gradle annotations

我正面临,错误:任务执行失败':app:packageAllDebugClassesForMultiDex'。

java.util.zip.ZipException:重复条目:android / support / annotation / AttrRes.class

build.gradle文件(主项目)

compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.android.gms:play-services-location:7.8.0'
    compile 'com.google.android.gms:play-services-maps:7.8.0'
    compile 'com.google.android.gms:play-services-gcm:7.8.0'
    compile 'com.google.android.gms:play-services-nearby:7.8.0'
    compile ('com.android.support:recyclerview-v7:+') {
        exclude module: 'support-v4'
    }
    compile 'com.firebase:firebase-client-android:2.3.1+'
    compile ('com.android.support:cardview-v7:22.0.+') {
        exclude module: 'support-v4'
    }
    compile ('com.squareup.okhttp:okhttp:2.4.0') {
        exclude module: 'support-v4'
    }
    compile ('com.squareup.picasso:picasso:2.5.2') {
        exclude module: 'support-v4'
    }
    compile ('com.squareup.retrofit:retrofit:2.0.0-beta1') {
        exclude module: 'support-v4'
    }
    compile('com.squareup.retrofit:converter-gson:2.0.0-beta1') {
        exclude module: 'gson'
    }
    compile('com.segment.analytics.android:all:2.5.1@aar') {
        transitive = true
        exclude module: 'support-v4'
    }
    compile ('com.android.support:design:22.2.0') {
        exclude module: 'support-v4'
    }
    compile('com.uservoice:uservoice-android-sdk:1.2.+') {
        exclude module: 'commons-logging'
        exclude module: 'httpcore'
        exclude module: 'httpclient'
    }
    compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
        transitive = true;
    }
    compile project(':contactsChipView')
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    compile project(':facebook-android-sdk-4.0.1')
    compile ('com.android.support:multidex:1.0.0'){
        exclude module: 'support-v4'
    }

/ libs目录(主项目)中的文件:

gson-2.2.3.jar
Parse-1.9.2.jar
YoutubeAnddroidPlayerApi.jar

/ libs目录(facebook模块)中的文件:

android-support-v4.jar
bolts.jar

正如您可以看到上面的gradle文件,我尝试为几乎所有依赖项添加exclude。但是,仍然没有运气。

我也尝试将构建工具从22.0.1更改为22.0.0,即使这样做也没有。

我经历了其他帖子,但没有运气。

有人知道如何解决这个问题吗?

0 个答案:

没有答案