0

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')
Rashid Afzaal
  • 155
  • 10
  • 1
    can you show your app gradle ? – mrid Oct 31 '17 at 07:50
  • What is your code? what did you try to do? – STF Oct 31 '17 at 07:50
  • Possible duplicate of [DuplicateFileException error while building Android APK](https://stackoverflow.com/questions/36700213/duplicatefileexception-error-while-building-android-apk) – mrid Oct 31 '17 at 07:51
  • 2
    You should to show all the stacktrace – Neuron Oct 31 '17 at 07:53
  • Hi @mrid, I just run the "gradlew dependencies" as suggested in the other link. But I received nothing, here is the result: https://gist.github.com/sheikhrashid/64d698e754c439b1dc2ae164e21a2cb5 – Rashid Afzaal Oct 31 '17 at 09:27
  • Hi @STF, It is open-source Quickblox Chat Application and I upgraded my SDK from 2.2.5 to 3.4. But I am receiving this error now. – Rashid Afzaal Oct 31 '17 at 09:29
  • Hi @EAmax, This is all I am getting on LogCat. https://gist.github.com/sheikhrashid/ce98306b16435ed1c6f863075959763f – Rashid Afzaal Oct 31 '17 at 09:37

1 Answers1

0

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!

Rashid Afzaal
  • 155
  • 10