gpt4 book ai didi

android - 运行时 gradle 异常

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:56:36 26 4
gpt4 key购买 nike

我知道这是一个重复的问题,但我尝试了很多代码但无法解决错误

Error:Execution failed for task
':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:
android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl.class

gradle 文件

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "com.cwish"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:recyclerview-v7:23.1.0@aar'
compile 'com.daimajia.numberprogressbar:library:1.2@aar'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.koushikdutta.ion:ion:2.+'
}

最佳答案

我想这个问题可以通过删除重复的依赖来解决,在删除重复的依赖之前,你应该通过这个命令检查你的模块:

gradlew -q dependencies yourProject:dependencies --configuration compile

引用这个答案:duplicate dependencies problem

希望对你有帮助:)

关于android - 运行时 gradle 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39717233/

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