java. util. zip. Zipexception: duplicate entry: Android / support / V7 / graphics / drawable / drawableutils class
•
Java
I just changed the support library from 23.0 0 updated to 23.1 0, now when I build the project, I receive this error:
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
This is my app level 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:2.5.2@aar') {
transitive = true;
}
}
What did I get this mistake? I want to use the latest version of the support library How can I solve this problem? I read this so thread and the solution is invalid It brings more errors to my code base In addition, I don't use jar Any help will be highly appreciated thank you.
Solution
I encountered the same problem in my react native Android project, which is why it is useful to me:
cd android ./gradlew clean
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
