错误:: app:transformClassesWithJarMergingForDebug

时间:2017-08-06 05:26:35

标签: java android gradle

我决定将appodeal集成到应用程序中,根据说明完成所有操作,但结果仍然相同:

  

错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / v7 / widget / DefaultItemAnimator $ 7.class

我搜索了这个问题,但我仍然找不到解决办法 这是gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.successdev.bookwindev.bookwin"
        vectorDrawables.generatedDensities = ['hdpi', 'xxhdpi']
        minSdkVersion 17
        targetSdkVersion 25
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

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

    compile project(':caldroidcustom')
    compile 'com.github.johnkil.android-robototextview:robototextview:3.0.0'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:palette-v7:25.3.1'
    compile 'com.aurelhubert:ahbottomnavigation:1.1.8'
    compile 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
    compile 'com.iceteck.silicompressorr:silicompressor:2.0'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.4.6'

    compile project(':cheetah-mobile-3.4.7')
    compile 'com.google.android.gms:play-services:11.0.2'
    compile 'com.google.android.gms:play-services-ads:11.0.2'
    compile 'com.google.android.gms:play-services-location:11.0.2'
    testCompile 'junit:junit:4.12'
}

P.S抱歉我的笨拙英语=)

1 个答案:

答案 0 :(得分:0)

将此添加到您应用的build.gradle:

configurations.all {
    resolutionStrategy {
        force 'com.android.support:recyclerview-v7:25.3.1'
    }
}