B4A v6.8 adds support for MultiDex compilation.
Enabling MultiDex:
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: https://developer.android.com/about/dashboards/index.html
B4A v6.80
Developers who use this version should replace the existing Dexer.jar with this one: www.b4x.com/android/files/Dexer.jar
Close the IDE and copy the updated Dexer.jar to the installation folder. It fixes an issue with Android 4 and the MultiDex feature.
Tips
- 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.
Enabling MultiDex:
B4X:
'main module
#MultiDex: True
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: https://developer.android.com/about/dashboards/index.html
B4A v6.80
Developers who use this version should replace the existing Dexer.jar with this one: www.b4x.com/android/files/Dexer.jar
Close the IDE and copy the updated Dexer.jar to the installation folder. It fixes an issue with Android 4 and the MultiDex feature.
Tips
- 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: