错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / starxsoft / lib / common / CommonUtils $ 1.class
我的应用程序gradle文件在这里,我有太多的答案,但没有找到合适的答案。
这里我使用两个包含相同类“CommonUtils”的.aar文件,aars如下:
那么如何修改gradle文件以解决问题呢。 并且错误仅在API级别19上发生。
defaultConfig {
applicationId "com.android4dev.navigationview"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
和依赖关系是:
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'
}