title: Too many classes in –main-dex-list
body: <p>I'm getting this exception while building my application.</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>I searched all and got the workaround here:</p>
  
  <p><a href="http://blog.osom.info/2014/12/too-many-methods-in-main-dex.html" rel="nofollow noreferrer">http://blog.osom.info/2014/12/too-many-methods-in-main-dex.html</a></p>
  
  <p>But what is the proper solution for this issue?</p>