Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.android.dx.util.DexException: Multiple dex files define

Tags:

android

dex

ant

I use ant release and got this error:

   [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
   [dx] com.android.dx.util.DexException: Multiple dex files define Lcom/android/vending/billing/IMarketBillingService;
   [dx]     at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:580)
   [dx]     at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:538)
   [dx]     at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:519)
   [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)

I have same error, but answers didn't help me

I tried:

  • Reinstall android sdk to other dir
  • Remove bin/gen dirs and clean project
  • Remove and add libs in eclipse
  • Change android API from 17 to 10
  • Make sure my bin folder is not included in my build path

I have 1 main project and 2 lib projects (Facebook and Expansion files downloader)

Thanks for answers!

like image 749
user2172670 Avatar asked Apr 08 '13 01:04

user2172670


1 Answers

Please check if the package includes com/android/vending/billing/IMarketBillingService is reference twice or more in your project settings.

like image 62
Robin Avatar answered Oct 04 '22 18:10

Robin