Android Tutorial MultiDex - Solves the too many methods error

B4A v6.8 adds support for MultiDex compilation.

Enabling MultiDex:
'main module
#MultiDex: True

With MultiDex enabled, the compiled classes are split into multiple dex files as needed.

When to do use it?

Only if you encounter one of the following errors during compilation:
- Too many field references
- Too many method references

There are issues with MultiDex and Android 2.x devices, however these devices are now less relevant:

B4A v6.80

Developers who use this version should replace the existing Dexer.jar with this one:

Close the IDE and copy the updated Dexer.jar to the installation folder. It fixes an issue with Android 4 and the MultiDex feature.


- Don't use this feature if not needed. Compilation will be a bit slower and there are no benefits.
- Test your APK on an Android 4.x device. There is no native support for MultiDex on Android 4.x so the process is more fragile.
Last edited:


Active Member
Licensed User
Longtime User
There are probably more 2.x devices out there than google would know. They have been prevented from actively participating in the store and cloud infrastructure for quite some time now.

Even the 4.04 devices I have (2) are supposed to be about the same percentage in their charts. I have a few clients that still use that vintage.