On Android’s methods to solve 65535 problems
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexIndexOverflowException: Cannot merge new index 66125 into a non-jumbo instruction!
Android applications store bytecode files in the form of DEX files. In Dalvik bytecode specification, the method reference index has only 16 bits, i.e. 65536. Methods in dex can only index 65536
Because the project refers to a large number of third-party jar packages or uses MVP mode to write code, the number of methods exceeds 65535. The official subcontracting method given by Google is:
1:
2:
2.1 "declare android.support.multidex.multidexapplication in the application of androidmanifest.xml;
2.2: if you write your own application, inherit the multidexapplication with your own application
2.3: if your application inherits other applications, rewrite attachbasecontext method in your application
The above article on how to solve the 65535 problem with Android is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.