重复输入错误ByteOrderMark.class

时间:2017-05-11 23:25:34

标签: android android-gradle build.gradle

我得到了multidex错误,所以我启用了它,现在我收到了这个错误:`

错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。 > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:org / apache / commons / io / ByteOrderMark.class

gradle.build

apply plugin: 'com.android.application'
apply plugin: 'android-apt'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.test"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        manifestPlaceholders = [appPackageName: "com.example.test"]
    }
    android {
        configurations.all {
            resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {

        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    compile 'com.google.firebase:firebase-ads:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.firebase:firebase-client-android:2.5.2'
    compile 'com.google.android.gms:play-services-auth:10.0.1'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.adobe.creativesdk.foundation:auth:0.9.1251'
    compile 'com.adobe.creativesdk:image:4.8.4'
    compile 'com.localytics.android:library:3.8.0'
    compile 'com.ramotion.foldingcell:folding-cell:1.0.1'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.easing:library:1.0.1@aar'
    compile 'com.daimajia.androidanimations:library:1.1.3@aar'
    compile 'com.daimajia.numberprogressbar:library:1.2@aar'
    compile 'com.github.javiersantos:BottomDialogs:1.2.1'
    compile 'com.github.Yalantis:GuillotineMenu-Android:1.2'
    compile 'com.github.hotchemi:permissionsdispatcher:2.0.7'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.eyalbira.loadingdots:loading-dots:1.0.2'
    testCompile 'junit:junit:4.12'
    apt 'com.github.hotchemi:permissionsdispatcher-processor:2.0.7'

}
apply plugin: 'com.google.gms.google-services'

`

1 个答案:

答案 0 :(得分:0)

我也面临同样的问题 搜索后我找到了这个解决方案

这是重复的问题

configurations {
    all*.exclude group: 'commons-io'
}

检查此链接 https://stackoverflow.com/a/36301313/6272799

相关问题