I am working on a project that is quickly approaching the 64K method limit for dex files. This Android Developer blog post (from July 2011) explains how to get dynamic class loading working with a command-line build driven by Ant, but does not explore how to get it working from within IDEs (besides saying it won't work within Eclipse).
I looked around and couldn't find anything on getting this system to work from within IntelliJ. Does IntelliJ supports building apps with multiple dex files? If so, how does one set it up?
Try using ProGuard to strip out unused classes and methods from your project and you should (hopefully) find you don't need multiple dex files.
That said if you do: IntelliJ and Eclipse are just IDEs -- they don't directly build your code -- so you will need to identify how your project is being built -- most likely Ant or Gradle.
If your project is a Gradle project then there will be a build.gradle file in the project root -- if this is the case then you will need to look how to accomplish the same with the Android Gradle plugin, a good place to start would be http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Manipulating-tasks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With