I'm getting following error when tried to build project.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:android/support/annotation/AnyRes.class
I tried to solve with the help of link here, But it's not working.
My build.gradle is below
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/gson-2.2.2.jar')
compile files('libs/okhttp-2.2.0.jar')
compile files('libs/okhttp-urlconnection-2.0.0.jar')
compile files('libs/okio-1.0.0.jar')
compile files('libs/retrofit-1.9.0.jar')
compile files('libs/easyandroidanimationslibrary.jar')
compile project(':materialDialog')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'jp.wasabeef:recyclerview-animators:1.3.0'
compile 'com.github.rey5137:material:1.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile "com.google.android.gms:play-services:8.3.0"
}
I've added
multiDexEnabled true
in defaultConfig
Related
I am getting this error
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/AuthFailureError.class
I attached my gradle please check and help me.
android {
useLibrary 'org.apache.http.legacy'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/android-async-http-1.4.4.jar')
compile files('libs/disklrucache-2.0.1.jar')
compile files('libs/google-gson.jar')
compile project(':linkedin-sdk')
compile files('libs/PGSDK_V2.0.jar')
compile 'com.android.support:support-v13:25.3.1'
compile files('libs/okhttp-1.2.1-jar-with-dependencies.jar')
compile files('libs/volley.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.razorpay:checkout:1.4.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.jjoe64:graphview:4.2.0'
}
Error:Execution failed for task
':app:transformClassesWithJarMergingForDebug'.>
com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry:
com/android/volley/AuthFailureError.class
Remove
compile files('libs/volley.jar') // From local lib also
Use
compile 'com.android.volley:volley:1.0.0'
I am using linkedin sdk,inside linkedin adk also one volley compile is
there and my app level I have one more volley dependency.
You should call volley:1.0.0 there.
Remove Below jar file from gradle
compile files('libs/volley.jar')
compile files('libs/google-gson.jar')
and compile below dependency
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.android.gms:play-services-auth:11.4.0'
When I try to compile my project, I get an error:
Error:Execution failed for task
':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry:
com/google/android/gms/internal/zzrn$1.class
I guess that problem concerns my dependencies. Here is a snippet of code:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.github.siyamed:android-shape-imageview:0.9.+#aar'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.firebase:firebase-auth:9.6.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.android.gms:play-services-auth:9.6.1'
compile 'com.google.android.gms:play-services-plus:8.3.0'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
testCompile 'junit:junit:4.12'
I was investigating, and try with the cmd and gradlew clean, but the problem still happen.
Anyone had the same problem and can tell me what is wrong?
i found the problem, remove compile 'com.google.firebase:firebase-auth:9.6.1' and change the version 9.6.1 a 8.3.0 of compile 'com.google.android.gms:play-services-auth:9.6.1'
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: io/codetail/animation/RevealAnimator$RevealFinishedGingerbread.class
This are my dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:palette-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'konifar:fab-transformation:1.0.0'
compile 'com.gordonwong:material-sheet-fab:1.2.1'
compile 'com.github.clans:fab:1.6.4'
compile 'com.android.support:multidex:1.0.0'
compile ('com.android.support:appcompat-v7:23.4.0') {
exclude module: 'support-v4'
}
}
apply plugin: 'com.google.gms.google-services'
How do i resolve this Error:Execution failed for task app:transformClassesWithJarMergingForDebug in android studio
com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry: org/apache/http/ConnectionClosedException.class
Here is my **build.grader** file
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// testCompile "org.robolectric:robolectric:3.0"
compile project(':slider')
compile project(':caldroid')
compile files('libs/FlurryAnalytics-6.2.0.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.google.code.gson:gson:2.4'
//compile 'org.apache.httpcomponents:httpclient:4.3.5'
compile 'org.apache.httpcomponents:httpmime:4.2.1'
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.maps.android:android-maps-utils:0.3.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.siyamed:android-shape-imageview:0.9.+#aar'
compile files('libs/android-viewbadger.jar')
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
}
apply plugin: 'com.google.gms.google-services'
Try ./gradlew clean It helped me
Execution failed for task ':wittyfeednew:packageAllDebugClassesForMultiDex'.
java.util.zip.ZipException: duplicate entry: com/google/android/gms/analytics/internal/Command$1.class
dependencies {
compile project(':titanic')
compile project(':urlImageViewHelper')
compile project(':socialauthandroid')
compile project(':rippleLibrary')
compile project(':loadMoreListView')
compile project(':facebookSDK')
compile project(':circularImageView')
compile project(':cardview')
compile project(':staggeredGrid')
compile project(':materialDesign')
compile 'com.android.support:support-v4:23.0.0'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:23.0.0'
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile files('libs/android-support-v7-recyclerview.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
compile files('libs/mail.jar')
compile files('libs/pinit-sdk-1.0-javadoc.jar')
compile files('libs/pinit-sdk-1.0.jar')
compile files('libs/socialauth-4.4.jar')
compile files('libs/volley.jar')
}