gpt4 book ai didi

java - 错误 :Execution failed for task ':app:transformClassesWithJarMergingForDebug' . > com.android 2

转载 作者:行者123 更新时间:2023-12-02 02:42:56 25 4
gpt4 key购买 nike

构建代码后,我收到错误。错误:任务“:app:transformClassesWithJarMergingForDebug”执行失败。

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: 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'

}

最佳答案

Android Studio 菜单:

Build/Clean Project

更新旧的依赖项

从这里answer

并确保您的 lib 文件夹中没有已有的重复库 build.gradle

关于java - 错误 :Execution failed for task ':app:transformClassesWithJarMergingForDebug' . > com.android 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45120261/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com