0

whenever i am trying to build my android project in ionic , it gives me the following errors :

Dex: The number of method references in a .dex file cannot exceed 64K.

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]:
65536
    at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:484)
    at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:26
    1)
    at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:473)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:50
    4)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)

How can i solve this problem ?

Asif Al Noman
  • 47
  • 1
  • 11

1 Answers1

0

Try using the cordova-multidex-plugin which enables Android multidexing on a Cordova application.

Use the following command to add the plugin:

cordova plugin add https://github.com/solent/cordova-plugin-multidex

You can also check out this SO post for more info on this.

Community
  • 1
  • 1
Gandhi
  • 11,875
  • 4
  • 39
  • 63
  • It wokrs !!! Thank you , for your help . Can you please tell me how to increase ionic android app speed without using crosswalk ? – Asif Al Noman Sep 28 '16 at 18:29
  • @AsifAlNoman WHat exactly is the issue? Will try to check it out as i dont have much expertise in Ionic – Gandhi Sep 30 '16 at 05:15