2017-07-15 85 views
0

我得到的错误,一旦我建立的代码。 错误:任务':app:transformClassesWithJarMergingForDebug'的执行失败。错误:任务':app:transformClassesWithJarMergingForDebug'的执行失败。 > com.android 2

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/widget/DefaultItemAnimator$7.class

摇篮文件的细节

apply plugin: 'com.android.application' 
android { 
compileSdkVersion 25 
buildToolsVersion "25.0.0" 
defaultConfig { 
    applicationId "#######################################################" 
    minSdkVersion 15 
    targetSdkVersion 25 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 

    multiDexEnabled true //important 
} 
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.android.support:appcompat-v7:25.3.1' 
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8' 
compile 'com.android.support:recyclerview-v7:25.3.1' 
compile 'com.android.support:design:25.3.1' 
testCompile 'junit:junit:4.12' 

// Appodeal 
compile project(':cheetah-mobile-3.4.7') 
compile 'com.google.android.gms:play-services-ads:9.8.0' 
compile 'com.google.android.gms:play-services-location:9.8.0' 

}

+0

哪里是你的**码**和**摇篮文件详细信息**? – sudo

回答

1

的Android工作室菜单:

Build/Clean Project

更新旧的依赖

从这个answer

,并确保您的lib文件夹不具有已在你build.gradle

1

默认APPODEAL ZIP包括

重复库
android-support-v7-recyclerview-23.1.1.jar 

文件。这可能与build.gradle中包含的其中一个依赖关系相冲突。

**只是将其删除**(所需的类将从其他依赖进口

相关问题