-1

These are my dependencies:

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'
}

I am getting following error:

com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: org/joda/time/base/BaseDateTime.class
Aspicas
  • 4,498
  • 4
  • 30
  • 53
Puneet Kala
  • 150
  • 2
  • 11

1 Answers1

0

The mentioned class it's present on more than one of your dependencies. You need to find out which two, and use exclude to remove it from one of those. Use the example below (I had to remove the gms package from the wearable library because of the same issue) :

compile('com.google.android.gms:play-services-wearable:7.5.0') {
    exclude group: 'com.google.android.gms'
}
Zsolt Boldizsar
  • 2,447
  • 2
  • 27
  • 37