0

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/starxsoft/lib/common/CommonUtils$1.class

My apps gradle file is here , I have google too many answers but didn't find an appropriate.

Here I am using two .aar files which are containing a same class "CommonUtils", and the aars are as :

  1. common_library-release.aar
  2. DeveloperCommonModule-release.aar

So How can i modify the gradle file to get rid of the problem. And the error is occurring only on API level 19.

   defaultConfig {
    applicationId "com.android4dev.navigationview"
    minSdkVersion 18
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}

and dependencies are:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'de.hdodenhof:circleimageview:1.3.0'
compile(name:'wizard_guide_library.1.0.1-release', ext:'aar')
compile(name:'common_library-release', ext:'aar')
compile(name:'widget_library-release', ext:'aar')
compile 'com.android.support:cardview-v7:23.2.+'
compile 'com.github.traex.rippleeffect:library:1.3'
compile(name: 'DeveloperCommonModule-release', ext: 'aar')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
compile 'com.android.support:percent:23.2.0'
}
sam
  • 113
  • 1
  • 9
  • 1
    There is a library in your project with the same dependency; you have to figure out the duplicate one and remove – Eenvincible Oct 06 '16 at 10:54
  • Can you try this? http://stackoverflow.com/questions/32901401/gradle-build-error-errorexecution-failed-for-task-apptransformresourceswith – Eenvincible Oct 06 '16 at 10:55
  • @Eenvincible i am not using same library – sam Oct 06 '16 at 10:57
  • Do you have any libraries inside your 'libs' folder? – Eenvincible Oct 06 '16 at 11:02
  • @Eenvincible yes these followings libraries i am using------------common_library-release.aar DeveloperCommonModule-release.aar widget_library-release.aar wizard_guide_library.1.0.1-release.aar – sam Oct 07 '16 at 07:17

0 Answers0