Tôi vừa cập nhật thư viện hỗ trợ từ 23.0.0 lên 23.1.0 và bây giờ khi tôi xây dựng dự án, tôi nhận được lỗi này:java.util.zip.ZipException: mục trùng lặp: android/support/v7/graphics/drawable/DrawableUtils.class
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/graphics/drawable/DrawableUtils.class
đây là mức ứng dụng của tôi build.gradle:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23"
defaultConfig {
applicationId 'com.galleri5.android'
multiDexEnabled true
minSdkVersion 16
targetSdkVersion 23
versionCode 6
versionName "0.6"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:design:23.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.3.0'
compile 'com.etsy.android.grid:library:1.0.5'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.github.clans:fab:1.6.1'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
}
tôi nhận được gì lỗi này? Tôi muốn sử dụng phiên bản mới nhất của thư viện hỗ trợ. Làm cách nào để khắc phục sự cố này? Tôi đọc this SO chủ đề và giải pháp không hoạt động. Nó cho nhiều lỗi hơn trong codebase của tôi. Ngoài ra, tôi không sử dụng JAR. Bất cứ sự giúp đỡ nào cũng được đánh giá cao. Cảm ơn.
sạch dự án sẽ giúp Và thiết lập 'compileSdkVersion 23 buildToolsVersion "23.0.1" ' –
cố gắng đó. Vẫn nhận được cùng một lỗi. –
Trong thiết bị đầu cuối thực hiện trong thư mục dự án gốc: ./gradlew clean http://stackoverflow.com/questions/33209631/errorexecution-failed-for-task-apptransformclasseswithjarmergingfordebug http://stackoverflow.com/questions/32968171/android- apptransformclasseswithjarmergingfordebug-failed-zipexception-dupli –