duplicate entry in android studio when using appboy sdk

331 Views Asked by At

I am searching in this issue from a lot of time

when I try to run my app on any device I got the following error

Error:Execution failed for task ':_4SaleApp:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: bo/app/a.class

I have tried many options to solve it, but none of them work with me

finally I run the following terminal command

gradlew -q app:dependencies 

then I found the following

+--- com.appboy:android-sdk-ui:1.11.2
|    +--- com.android.support:support-v4:23.0.1 -> 23.1.0 (*)
|    \--- com.appboy:android-sdk-jar:1.11.2

I don't know why appboy include 23.0.1 -> 23.1.0 (*)

can anyone tell me how to solve this problem ??

2

There are 2 best solutions below

2
On

Try putting it in your gradle

configurations {
    all*.exclude group: 'com.android.support', module: 'support-v4'
}
2
On

In your build.gradle do the following :

compile('com.appboy:android-sdk-ui:1.11.2') {
exclude group: 'com.android.support', module: 'multidex'
}