Multidex重复输入

时间:2015-10-20 14:48:23

标签: android android-multidex

这些是我的依赖项:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.facebook.android:facebook-android-sdk:4.6.0'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'org.elasticsearch:elasticsearch:2.0.0-rc1'
}

我收到以下错误:

com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: org/joda/time/base/BaseDateTime.class

1 个答案:

答案 0 :(得分:0)

上面提到的类,它出现在多个依赖项上。您需要找出哪两个,并使用exclude从其中一个中删除它。 使用下面的示例(由于同样的问题,我不得不从可穿戴库中删除gms包):

compile('com.google.android.gms:play-services-wearable:7.5.0') {
    exclude group: 'com.google.android.gms'
}
相关问题