我收到此错误
错误:任务执行失败 ':应用程序:transformClassesWithJarMergingForDebug'。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / v7 / util / SortedList $ BatchedCallback.class
这是我的构建gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.cuztomise.services"
minSdkVersion 11
targetSdkVersion 21
multiDexEnabled =true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
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.android.support:recyclerview-v7:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support:palette-v7:23.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.google.http-client:google-http-client-android:+'
compile 'com.google.api-client:google-api-client-android:+'
compile 'com.google.api-client:google-api-client-gson:+'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services-maps:8.3.0'
compile 'com.android.support:multidex:1.0.1'
}
apply plugin: 'com.google.gms.google-services'
答案 0 :(得分:0)
使用build采用SDK V-21和java版本1_7或更低版本。
https://developer.android.com/about/dashboards/index.html
Are android apps backwards compatible?
阅读本文非常重要: Is it possible to use Java 8 for Android development?