Thanks to your comment I just realized that predexed libraries are causing this behaviour. If you disable predexing incremental dexing seems to work and is also quiet a bit faster. My guess is: Since incremental dexing doesn't dex everything predexing isn't a speedup anymore. Libraries are dexed once because their class files don't change.
Am Freitag, 19. September 2014 18:55:11 UTC+2 schrieb Thasso Griebel: > > Hey, > > just to confirm, I also still see the issue with the latest 0.13.0 gradle > plugin. The duplicated class is found first in : > > <submodule_folder>/build/intermediates/dex/debug/classes.dex > > as well as in > > > <submodule_folder>/build/intermediates/pre-dexed/debug/acra-4.4.0-4f3087dc293438b0cfab28d844cf164e6fb101ba.jar > > acra is a third party dependency used by the module. > > The following stacktrace is printed: > > UNEXPECTED TOP-LEVEL EXCEPTION: > com.android.dex.DexException: Multiple dex files define > Lorg/acra/ACRA$1; > at > com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594) > at > com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552) > at > com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533) > at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170) > at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) > at > com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439) > at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287) > at com.android.dx.command.dexer.Main.run(Main.java:230) > at com.android.dx.command.dexer.Main.main(Main.java:199) > at com.android.dx.command.Main.main(Main.java:103) > > Any advice if the combination of incremental dexing + predexing is suppose > to work or how we could get it to work would be much appreciated. > > Best, > -Thasso > > > On Thursday, September 18, 2014 11:18:45 PM UTC+2, Michael Wallstedt wrote: >> >> I can confirm that the "multiple dex files define x" error occurs in >> Android Studio 0.8.2 with a multi module project. Is there a bug to track >> this and/or an ETA for a fix? >> >> On Friday, June 20, 2014 7:28:18 AM UTC-7, Mike Kulasinski wrote: >>> >>> Hi >>>> >>>> I have also experienced the Multiple dex problem, I have turned of >>>> incremental dexing and this fixed the issue, I am running Gradle 1.12, >>>> Android Studio 0.6.1, Android Gradle Plugin 1.11.1. I have experienced >>>> this >>>> problem from early version 0.10. >>>> >>>> Any idea how to fix this problem? >>>> >>>> Thanks >>>> >>>> Mike >>>> >>> -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
