我不知道为什么会出现这个错误,而我却无法解决。
请为此提供确切的解决方案。我受够了这个错误。我知道这可能会重复出现问题,但是这些解决方案对我来说不起作用。我可以调试apk,但无法生成签名的apk。
在生成签名的apk时,它给了我以下异常:
错误:任务':app:transformClassesWithJarMergingForRelease'的执行失败。


  com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:io / codetail / widget / RevealLinearLayout.class


这是我的App Gradle:

dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'org.achartengine:achartengine:1.2.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') {
        transitive = true;
    }
    compile 'org.jsoup:jsoup:1.8.3'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.pkmmte.view:circularimageview:1.1'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'org.achartengine:achartengine:1.2.0'
    compile 'com.github.npanigrahy:Custom-Calendar-View:v1.0'
    compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
    compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'
    compile 'com.google.android.gms:play-services:8.3.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'pub.devrel:easypermissions:0.1.9'
    compile 'com.github.ksoichiro:android-observablescrollview:1.6.0'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.16'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile 'com.github.rey5137:material:1.2.2'
    compile 'uk.co.chrisjenx:calligraphy:2.1.0'
    compile 'com.github.blackfizz:eazegraph:1.2.5l@aar'
    compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'
    compile 'com.squareup.picasso:picasso:2.5.2'
     compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.squareup.picasso:picasso:2.4.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') {
        transitive = true;
    }
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support:palette-v7:23.4.0'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile('com.weiwangcn.betterspinner:library:1.1.0') {
        exclude group: 'com.android.support', module: 'appcompat-v7'
    }
    compile 'swarajsaaj:otpreader:1.0'
    compile('com.github.ozodrukh:CircularReveal:1.3.1@aar') {
        transitive = true;
    }
    compile 'com.flipboard:bottomsheet-core:1.4.3'
    compile 'com.flipboard:bottomsheet-commons:1.4.3'
    compile 'com.riontech.staggeredtextgridview:staggeredtextgridview:1.0.1'
    compile 'konifar:fab-transformation:1.0.0'
    compile project(':flickabledialog')
    compile 'com.android.support:support-v4:23.4.0'
}

最佳答案

你越来越


  com.android.build.api.transform.TransformException:
  java.util.zip.ZipException:重复项:


你有多个

compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'//remove this
compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'

compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.picasso:picasso:2.4.0' //remove this

compile 'com.github.PhilJay:MPAndroidChart:v2.1.6' // Two times


注意

像上面的gradle部分中存在很多相同的依赖项。删除它们。

关于android - 错误:任务':app:transformClassesWithJarMergingForRelease'的执行失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41458087/

10-11 22:23
查看更多