[英]Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException
[英]Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android 2
構建代碼后,出現錯誤。 錯誤:任務':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.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'
}
默認的APPODEAL ZIP包含
android-support-v7-recyclerview-23.1.1.jar
文件。 這可能與build.gradle中包含的依賴項之一沖突。
**只需刪除它**(所需的類將從其他依賴項中導入
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.