Logcat Error:
Error:Execution failed for task ':app:packageAllLocalVersionDebugClassesForMultiDex'.>java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class
App Gradle Dependency:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3#aar'
compile 'com.daimajia.swipelayout:library:1.1.8#aar'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'com.facebook.fresco:fresco:0.9.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile project(':floating_button_library')
compile 'com.facebook.android:facebook-android-sdk:4.10.0'
}
After adding the dependency for Facebook SDK the build throws an Exception
suggest me an answer thanks..
EDIT:
SOLVED THE ERROR
Now they split bolts-android into bolts-applinks and bolts-tasks .so you need exclude both from the gradle build
compile ('com.facebook.android:facebook-android-sdk:4.10.0'){
exclude group: 'com.parse.bolts',
module: 'bolts-tasks'
exclude group: 'com.parse.bolts',
module: 'bolts-applinks';}
This works perfectly for me !!!!
there were two DIFFERENT versions of it conflicting. the facebooksdk
comes with bolts-android-1.1.x and appcompatv7 comes with 1.1.x.
so add below line,
compile ('com.facebook.android:facebook-android-sdk:4.10.0'){
exclude module: 'bolts-android'
exclude module: 'support-v4'
}
Related
I have tried all type of packagingOptions, but nothing worked. That is why posting a new question with my error.
Error:
Error:Execution failed for task ':ChatOn_Chat:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK org.jivesoftware.smack/version
File1: C:\Users\rashid.android\build-cache\11fbeabe7e4519c3c4539d013b76fb32545ef43d\output\jars\classes.jar
File2: F:\changes SKyCHat\SkyChat\HeyYapp-Android\ChatOn_core\build\intermediates\bundles\default\classes.jar
Dependenies of my Main Project:
compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':ChatOn_core')
compile project(':cropper')
compile project(':stickyListHeaders')
compile "com.nostra13.universalimageloader:universal-image-loader:${rootProject.universalImageLoaderVersion}"
compile "com.google.android.gms:play-services:${rootProject.googlePlayServicesVersion}"
compile('de.keyboardsurfer.android.widget:crouton:1.8.4#aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile "com.nineoldandroids:library:${rootProject.nineoldandroidsVersion}"
compile 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
compile 'com.crashlytics.android:crashlytics:1.1.13'
compile 'com.android.support:appcompat-v7:25.3.1'
Dependencies of my other Module:
compile 'io.pristine:libjingle:10839#aar'
compile files('libs/quickblox-android-sdk-chat-3.4.jar')
compile files('libs/quickblox-android-sdk-content-3.4.jar')
compile files('libs/quickblox-android-sdk-core-3.4.jar')
compile files('libs/quickblox-android-sdk-messages-3.4.jar')
compile files('libs/quickblox-android-sdk-videochat-webrtc-3.4.jar')
I just solved my problem. I was using same Jar and Dependency.
1st:
compile files('libs/quickblox-android-sdk-chat-3.4.jar')
2nd:
compile 'com.quickblox:quickblox-android-sdk-chat:3.4'
Thanks everyone!
I have a problem when I try to generate an apk with Android Studio 2.3
I'm getting an error:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/antlr/v4/runtime/ANTLRErrorListener.class
I understand that some of my dependencies must implement the same methods, but I can't figure out which one,
Here are my dependencies
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:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.graphql-java:graphql-java:2016-10-19T14-40-14'
compile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'org.altbeacon:android-beacon-library:2.12.2'
compile 'io.fotoapparat.fotoapparat:library:1.4.1'
testCompile 'junit:junit:4.12'
}
Thank you
You can exclude the antlr4 in the dependency with:
compile('com.graphql-java:graphql-java:2016-10-19T14-40-14') {
exclude module: 'antlr4'
}
You can find the related issues here:
https://github.com/graphql-java/graphql-java/issues/225
https://github.com/graphql-java/graphql-java/issues/254
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'
Please let me know what exactly require here, I can see same source is running fine in Android Studio Emulators but in third party emulators like bluestacks I can see following errors.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/activeandroid/ActiveAndroid.class
Please check my gradle dependencies here.
dependencies {
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile files('library/android-viewbadger.jar')
compile files('library/robobinding-0.8.1.jar')
compile files('library/activeandroid-3.1-SNAPSHOT.jar')
compile project(':Android-Validator')
// compile files('library/java-rt-jar-stubs-1.5.0.jar')
}
dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.0.1'
compile ('com.android.support:appcompat-v7:25.0.1'){
exclude module: 'support-v4'
}
compile 'com.viewpagerindicator:library:2.4.1#aar'
compile 'com.f2prateek.progressbutton:progressbutton:2.1.0#aar'
compile files('library/afreechart-0.0.4.jar')
compile 'commons-io:commons-io:+'
compile 'com.google.code.gson:gson:2.2.+'
compile 'com.google.guava:guava:16+'
compile 'joda-time:joda-time:2.9.4'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'com.sun.codemodel:codemodel:2.4.1'
compile 'org.apache.httpcomponents:httpmime:4.5.1'
compile 'ch.acra:acra:4.9.0'
compile 'org.jsoup:jsoup:1.10.2'
compile 'org.apache.commons:commons-lang3:3.4'
compile ('org.simpleframework:simple-xml:2.7.1'){
exclude module: 'stax'
exclude module: 'stax-api'
exclude module: 'xpp3'
}
compile files('library/pdfjet-5.75.jar')
compile 'log4j:log4j:1.2.17'
compile 'com.splunk:mint-android-sdk:5.2.1'
compile 'de.mindpipe.android:android-logging-log4j:1.0.3'
compile files('library/ksoap2-android-assembly-2.5.8-jar-with-dependencies.jar')
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
}
This issue usually came when the same class is added in gradle twice.
Why you are using
compile files('library/activeandroid-3.1-SNAPSHOT.jar')
and
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
This is the reason for this.Try adding it once only and then build the gradle and run
after the update of Android Support Repository (not sure that is related) I'm getting this error while run my application for debug:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException:
duplicate entry: com/google/android/gms/measurement/AppMeasurementService.class
I read many answers about similar exception but I could not find one the suit mine.
These are my library dependencies:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:support-v13:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
compile "com.android.support:customtabs:${supportLibVersion}"
compile "com.android.support:recyclerview-v7:${supportLibVersion}"
compile 'com.bignerdranch.android:expandablerecyclerview:2.1.1'
compile 'com.mikepenz:iconics-core:2.5.11#aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original#aar'
compile('com.github.afollestad.material-dialogs:core:0.8.5.8#aar') {
transitive = true
}
compile('com.github.afollestad.material-dialogs:commons:0.8.5.8#aar') {
transitive = true
}
compile "com.google.android.gms:play-services-maps:${playServicesLibVersion}"
compile "com.google.android.gms:play-services-gcm:${playServicesLibVersion}"
compile "com.google.android.gms:play-services-location:${playServicesLibVersion}"
compile "com.google.android.gms:play-services-plus:${playServicesLibVersion}"
compile "com.google.android.gms:play-services-auth:${playServicesLibVersion}"
compile "com.google.firebase:firebase-core:${playServicesLibVersion}"
compile "com.google.firebase:firebase-ads:${playServicesLibVersion}"
compile "com.google.firebase:firebase-messaging:${playServicesLibVersion}"
compile 'com.annimon:stream:1.0.8'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.soundcloud.android:android-crop:1.0.1#aar'
compile files('libs/azure/notificationhubs/notification-hubs-0.4.jar')
compile files('libs/azure/notifications/notifications-1.0.1.jar')
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.squareup.okhttp:okhttp:2.6.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.6.0'
compile 'com.google.code.gson:gson:2.6.2'
compile ('org.simpleframework:simple-xml:2.7.1') {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
compile 'com.facebook.conceal:conceal:1.0.1#aar'
compile 'com.facebook.android:facebook-android-sdk:4.8.1'
compile 'me.tatarka.bindingcollectionadapter:bindingcollectionadapter:1.0.1'
compile 'me.tatarka.bindingcollectionadapter:bindingcollectionadapter-recyclerview:1.0.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'jp.wasabeef:glide-transformations:1.3.1'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
}
And these are my app dependencies:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':core')
compile "com.android.support:cardview-v7:${supportLibVersion}"
compile 'com.github.rey5137:material:1.2.2'
compile 'net.opacapp:multiline-collapsingtoolbar:1.0.0'
compile 'jp.wasabeef:recyclerview-animators:2.2.0'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
apt "org.parceler:parceler:1.0.4"
compile 'org.parceler:parceler-api:1.0.4'
compile 'com.android.support:multidex:1.0.1'
}
I know that I'm supposed to remove a dependency that cause the conflict but I don't know which one I've to remove.
Need help :)
Thanks in advance
EDIT
I've notice right now that from Android Studio, in the Project tab, inside External Libraries there is the play_services_measurement_8_3_0 that I've not included anywhere. During build I can also see this line:
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library
I've recently included the firebase library inside my project so I think that the problems is here....maybe...but I'm not able to remove it. How can I fix that?