错误:任务'的执行失败:app:transformClassesWithJarMergingForDebug'。
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / api / client / http / AbstractHttpContent.class
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "dev.com.diaginfo"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
debug {
debuggable true
}
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:24.2.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.android.support:design:24.2.0'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.wdullaer:materialdatetimepicker:2.5.0'
compile 'com.android.volley:volley:1.0.0'
compile 'joda-time:joda-time:2.9.4'
compile 'com.google.code.gson:gson:2.7'
compile'com.google.android.gms:play-services:9.4.0'
compile 'com.android.support:multidex:1.0.1'
compile ('com.google.android.gms:play-services-identity:9.4.0') {
exclude group: 'org.apache.httpcomponents'
}
compile ('com.google.android.gms:play-services-auth:9.4.0') {
exclude group: 'org.apache.httpcomponents'
}
compile 'pub.devrel:easypermissions:0.1.5'
compile "com.squareup.picasso:picasso:2.5.2"
compile('com.google.api-client:google-api-client-android:1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-drive:v3-rev35-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-sheets:v4-rev13-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-tasks:v1-rev45-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
}
apply plugin: 'com.google.gms.google-services'
我不知道如何处理此错误,因为我添加了
defaultConfig {
...
multiDexEnabled true
}
提前感谢。
答案 0 :(得分:2)
您在依赖项中添加了整个'com.google.android.gms:play-services:9.4.0'
库,然后您也在使用auth, identity
的分割版本。请参阅https://developers.google.com/android/guides/setup了解正确的构建依赖性。