Too many classes in –main-dex-list, main dex capacity exceeded

Let’s first understand the problem: On pre-Lollipop devices, only main dex is being loaded by the framework. To support multi-dex applications you have to explicitly patch application class loader with all the secondary dex files (this is why your Application class have to extend MultiDexApplication class or call MultiDex#install). This means that your application’s main … Read more

How to shrink code – 65k method limit in dex

It looks like Google has finally implementing a workaround/fix for surpassing the 65K method limit of dex files. About the 65K Reference Limit Android application (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. The Dalvik Executable specification limits the … Read more

decompiling DEX into Java sourcecode

It’s easy Get these tools: dex2jar to translate dex files to jar files jd-gui to view the java files in the jar The source code is quite readable as dex2jar makes some optimizations. Procedure: And here’s the procedure on how to decompile: Step 1: Convert classes.dex in test_apk-debug.apk to test_apk-debug_dex2jar.jar d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk … Read more