Execution failed for task ':wittyfeednew:packageAllDebugClassesForMultiDex' - android

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')
}

Related

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/multidex/MultiDex$V14.class

this is my build.gradle,when I run app ,it report this error mesaage:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/multidex/MultiDex$V14.class
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':library')
compile project(':pullToRefreshLibrary')
compile files('libs/flame.jar')
compile files('libs/httpclient-4.2.4.jar')
compile files('libs/httpcore-4.2.4.jar')
compile files('libs/httpmime-4.2.4.jar')
compile files('libs/mp3agic.jar')
compile files('libs/libammsdk.jar')
compile files('libs/ShareSDK-Core-2.8.3.jar')
compile files('libs/oraleval-android-sdk.jar')
compile 'fm.jiecao:jiecaovideoplayer:5.5.2#aar'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
//google play
compile 'com.uwetrottmann.photoview:library:1.2.4'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.4'
compile 'com.wdullaer:materialdatetimepicker:2.5.0'
compile 'com.getui:sdk:2.9.5.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:support-v4:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
//Logger
compile 'com.orhanobut:logger:2.1.1'
compile files('libs/xUtils-2.6.14.jar')
compile files('libs/mta-sdk-1.6.2.jar')
compile files('libs/open_sdk_r5793.jar')
//wechat
compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:1.0.2'
//banner
compile 'com.youth.banner:banner:1.4.9'
//recyclerview
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.nineoldandroids:library:2.4.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//cardview
compile 'com.android.support:cardview-v7:23.1.1'
compile files('libs/AndroidPicker-1.5.3.jar')
compile 'com.tencent.bugly:crashreport:latest.release'
compile 'com.tencent.bugly:nativecrashreport:latest.release'
compile files('libs/fastjson-1.2.5.jar')
compile project(':photodraweeview')
compile 'com.facebook.fresco:fresco:0.11.0'
compile 'com.facebook.fresco:animated-gif:0.11.0'
compile 'org.litepal.android:core:1.5.0'
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
compile files('libs/giisosdk.jar')
compile 'com.android.support:multidex:1.0.1'
}
First of all, you need to use the same version for support library, like this:
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
//cardview
compile 'com.android.support:cardview-v7:23.1.1'
Then try only use one of JSON library, gson or fastjson:
compile 'com.google.code.gson:gson:2.7'
//compile files('libs/fastjson-1.2.5.jar')

Android project building failed with `TransformException`

My Android project build success with Android Studio 2.3, but on Android Studio 3.0.0-alpha7, it throws this exception:
:app:transformClassesWithJarMergingForStagingDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForStagingDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/facebook/R$attr.class
There is only 1 library that working with Facebook and declare Facebook SDK inside:
compile('ly.kite:facebook-photo-picker:1.2.0') {
exclude group: 'com.facebook.android', module: 'facebook-android-sdk'
}
Is this problem of Android Studio or Library?
*Update: * This is entire dependencies in the project:
dependencies {
provided fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:multidex:1.0.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.3.0'
compile 'com.amazonaws:aws-android-sdk-core:2.2.13'
compile 'com.amazonaws:aws-android-sdk-mobileanalytics:2.2.13'
compile 'com.amazonaws:aws-android-sdk-s3:2.2.13'
compile 'com.isseiaoki:simplecropview:1.1.4'
compile 'com.jpardogo.materialtabstrip:library:1.1.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile 'com.daasuu:animateHorizontalProgressBar:0.2.0'
compile 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
compile 'com.makeramen:roundedimageview:2.2.1'
provided files('libs/isoviewer-1.0-RC-28.jar')
provided files('libs/gcm.jar')
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.ms-square:expandableTextView:0.1.4'
compile 'net.lingala.zip4j:zip4j:1.3.2'
compile 'com.apptentive:apptentive-android:3.0.0'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile 'com.github.delight-im:Android-SimpleLocation:v1.0.1'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.github.alex-townsend:SwipeOpenItemTouchHelper:1.2.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.pusher:pusher-java-client:0.3.3'
compile 'com.google.code.gson:gson:2.7'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
// compile 'com.github.boxme:squarecamera:1.1.0'
compile "com.daimajia.swipelayout:library:1.2.0#aar"
compile 'com.daimajia.androidanimations:library:1.1.2#aar'
compile 'jp.wasabeef:recyclerview-animators:2.1.0'
compile 'com.github.lamydev:android-notification:3.0'
compile 'com.afollestad:material-camera:0.2.14'
compile 'at.blogc:expandabletextview:1.0.3'
compile 'com.commonsware.cwac:cam2:0.6.6'
compile 'com.squareup.moshi:moshi:1.2.0'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.google.android.gms:play-services-gcm:11.0.2'
compile 'org.slf4j:slf4j-api:1.7.13'
compile 'com.github.tony19:logback-android-core:1.1.1-4'
compile 'com.github.tony19:logback-android-classic:1.1.1-4'
compile('com.papertrailapp:logback-syslog4j:1.0.0') {
exclude group: 'ch.qos.logback'
}
compile 'com.github.darsh2:MultipleImageSelect:3474549'
compile "com.mixpanel.android:mixpanel-android:4.9.8"
compile 'com.intuit.sdp:sdp-android:1.0.4'
// compile "com.google.android.gms:play-services:7.5.0+"
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6#aar') {
transitive = true
}
compile 'net.yazeed44.imagepicker:imagepicker:1.3.0'
compile 'com.github.IHNEL:android-media-picker:git_hub-SNAPSHOT'
compile 'me.amiee:nicetab:1.0.0'
compile 'io.github.rockerhieu:emojicon:1.4.0'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3#aar'
compile 'com.facebook.android:facebook-android-sdk:4.18.0'
compile('ly.kite:facebook-photo-picker:1.2.0') {
exclude group: 'com.facebook.android', module: 'facebook-android-sdk'
}
compile 'com.github.IHNEL:android-oauth2-client:-SNAPSHOT'
compile 'com.github.IHNEL:emojicon:-SNAPSHOT'
}

ZipException: duplicate entry: io/codetail/animation/RevealAnimator$RevealFinishedGingerbread

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'

Solve transformClassesWithJarMergingForDebug Error

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

TransformException duplicate entry for android.support.annotation.AnyRes.class

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

Categories

Resources