java.util.zip.ZipException: duplicate entry during packageAllDebugClassesForMultiDex

后端 未结 21 1295
孤街浪徒
孤街浪徒 2020-11-22 07:37

I am not sure what this error means.

Execution failed for task \':excelSior:packageAllDebugClassesForMultiDex\'.
> java.util.zip.ZipException: duplicate          


        
相关标签:
21条回答
  • 2020-11-22 08:04

    This problem cost me one whole day. I finally downgraded the firebase-ui library version from 2.0.0 to 1.2.0 and added the following code inside Project level build.gradle file:

    allprojects {
        repositories {
            jcenter()
    
            // Add the following code to your project level build.gradle
            maven {
                url 'https://maven.fabric.io/public'
            }
        }
    }
    
    0 讨论(0)
  • 2020-11-22 08:06

    I also have the issue because of i have compile 'com.android.support:appcompat-v7:24.0.0-alpha1' but i added recyclerview liberary compile 'com.android.support:recyclerview-v7:24.0.2'..i changed the version as same as compat like (24.0.2 intead of 24.0.0).

    i got the answer..may be it will help for someone.

    0 讨论(0)
  • 2020-11-22 08:07

    You've probably fixed this by now but just so this doesn't stay unanswered, Try adding this to your build.gradle:

    configurations {
        all*.exclude group: 'com.android.support', module: 'support-v4'
    }
    
    0 讨论(0)
  • 2020-11-22 08:08

    I had the same problem after upgrading the android SDK. I was able to run the application in the buildToolsVersion '23.0.1', I got the same error when I changed to buildToolsVersion '24.0.3'

    I resolved the problem by updating my java version from 1.7 to 1.8 with compileSdkVersion 24

    0 讨论(0)
  • 2020-11-22 08:09

    You need to check that you have inserted v4 library and compile library? You must not repeat library in your app or your dependence program.

    delete the repeat library so that just one V4 remains.

    in your app dir build.gradle file add this command:

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

    it works for me! You can try it!

    0 讨论(0)
  • 2020-11-22 08:10

    For Expose.class Error i.e

    java.util.zip.ZipException: duplicate entry: com/google/gson/annotations/Expose.class

    use the below code

    configurations {
        all*.exclude  module: 'gson'
    }
    
    0 讨论(0)
提交回复
热议问题