Multi-dex support

How to enable multidex support for android applications?
I’m getting

[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
       [dx] com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
       [dx] 	at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
       [dx] 	at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
       [dx] 	at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
       [dx] 	at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
       [dx] 	at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
       [dx] 	at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
       [dx] 	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
       [dx] 	at com.android.dx.command.dexer.Main.run(Main.java:277)
       [dx] 	at com.android.dx.command.dexer.Main.main(Main.java:245)
       [dx] 	at com.android.dx.command.Main.main(Main.java:106)

Do you think we’re crossing the limit?

https://developer.android.com/tools/building/multidex.html

I’m trying to connect http://www.appodeal.com/ ads network into my project when getting that error. There are few jar libraries + google play services.

Seems i broke the rules, sorry :slightly_smiling:
I want to add appodeal ads network to my project. Seems it’s too many libs for dex right now.

Hi, I have this issue as well when integrating Heyzap with my game (lots of ad network jars)

I’m having the same problem :frowning:

I’m adding MoPub, Google Play Services, Facebook SDK, and I’ll need to add Google Analytics soon and I’m already at limit.

Any simple solution to this problem?

1 Like