java错误:任务执行失败,重复条目
我收到以下错误消息:
Error:Execution failed for task ':app:packageAllReleaseClassesForMultiDex'. java.util.zip.ZipException: duplicate entry: 安卓/support/v4/print/PrintHelper$1.class
我的身材等级:
apply plugin: 'com.安卓.application'
安卓 {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.doldurkazan.umutbahadir.sonolsun"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile ('com.安卓.support:appcompat-v7:22.0.0') {
exclude module: 'support-v4'
}
compile files('libs/安卓-async-http-1.4.8.jar')
compile files('libs/安卓-support-v4.jar')
compile files('libs/universal-image-loader-1.9.4-with-sources.jar')
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-安卓.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.安卓.support:appcompat-v7:23.1.1'
compile files('libs/ksoap2-安卓-assembly-2.4-jar-with-dependencies.jar')
}
让我知道如何解决这个问题
# 1 楼答案
希望这能奏效。。。。确保从libs文件夹中删除jar文件,因为它们会给您带来问题。现在它从maven获取最新版本
# 2 楼答案
你为什么这么做
而不是像添加appcompat一样包含v4支持库???这是产生错误的保证方法
# 3 楼答案
试着去掉这个
编写代码并清理项目。这可能会有帮助
# 4 楼答案
试试这个
您可能需要,也可能不需要添加
使用中的支持库的所有版本都需要匹配,因此可以在同一个项目中混合使用v23和v22