Too many classes in --main-dex-list


(sreenivas karthikeyan) #1

Hi,

I’m getting this exception while building my application.

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Too many classes in --main-dex-list, main dex capacity exceeded
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:494)
at com.android.dx.command.dexer.Main.runMultiDex(Main.java:332)
at com.android.dx.command.dexer.Main.run(Main.java:243)
at com.android.dx.command.dexer.Main.main(Main.java:214)
at com.android.dx.command.Main.main(Main.java:106)

I searched all and got the workaround here http://blog.osom.info/2014/12/too-many-methods-in-main-dex.html .
But what is the proper solution for this issue.?