Reputation: 1469
I recently added the jars joda-time-2.3
and joda-time-2.3-sources
. My project continues to work fine on eclipse, but jenkins (ant) is breaking. Does anyone know how to fix this?
[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
[dx] com.android.dx.util.DexException: Multiple dex files define Lorg/joda/time/Chronology;
[dx] at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:592)
[dx] at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:550)
[dx] at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:531)
[dx] at com.android.dx.merge.DexMerger.mergeDexBuffers(DexMerger.java:168)
[dx] at com.android.dx.merge.DexMerger.merge(DexMerger.java:186)
[dx] at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:300)
[dx] at com.android.dx.command.dexer.Main.run(Main.java:232)
[dx] at com.android.dx.command.dexer.Main.main(Main.java:174)
[dx] at com.android.dx.command.Main.main(Main.java:91)
Edit
How do I tell Jenkins/ant to stop looking once one source is found? assuming that is the problem.
Upvotes: 0
Views: 316
Reputation: 12534
joda-time-2.3-sources.jar includes class files as well.
The solution is to simply remove joda-time-2.3-sources.jar from your project.
joda-time-2.3.jar contains all of the classes you need. The inclusion of the other jar is what is introducing multiple instances of the same classes.
Upvotes: 1