hackingforgirls hackingforgirls - 2 months ago 24
Android Question

java.util.zip.ZipException: duplicate entry: dagger/Provides.class

When I sync the project everything is ok, but when I try to run I've got this error:

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

Here is my app build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'android-apt'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "appID"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

dependencies {

compile 'com.android.support:appcompat-v7:23.0.0'

compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'

apt 'com.google.dagger:dagger-compiler:2.5'
compile 'com.google.dagger:dagger:2.5'
provided 'javax.annotation:jsr250-api:1.0'

compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'

compile('com.sumup:merchant-sdk:1.61.0@aar') {
transitive = true

If I run without
compile 'com.google.dagger:dagger:2.5'
it is success compiled.. please help.



It looks like sumup sdk is not compatible with dagger 2.+.

So I have downgrade to dagger 1.+ and it is working ok. No other issues appeared until now.