This post was originally published at Announcing Multidex Support for Android Builds in Corona SDK

With the recent wave of new plugins, some Corona developers have reported Android build failures with errors like this:

This error happens due to a design limitation in the Android platform where the file containing the compiled Android code is limited to 65k symbols. More information on this limitation can be found here.

Today, we are pleased to announce that Corona SDK projects built for Android are no longer subject to this limit, thanks to Multidex support!

What is Multidex support?

Multidex support allows the Android build system to generate multiple files containing Android bytecode and be able to load symbols between the two dynamically. These Android bytecode files are known as DEX files and as previously mentioned, each one has a hard limit of 65k symbols.

How do I take advantage of multidex in Corona SDK?

The only thing you’ll need to do to take advantage of multidex support is upgrade to daily build 2016.2853 or later. After that, you don’t have to do anything to perform a multidex build for Android. Just do an Android build as you normally would and our build system will take care of the rest for you.

How does Corona address known multdex limitations?

The multidex system isn’t perfect for older versions of Android and there are known limitations. We’ve done our best to ensure Corona-made apps aren’t hindered by these limitations.

That said, we still advise you test your project on older versions of Android (2.3.3 – 4.0). If your project does run into any of the limitations listed in the link above, you may have to change the minSdkVersion of your project to API Level 14 (Android 4.0). You can do this by adding the following to your build.settings:

Impact on Android Builds through Corona SDK.

Generating Android apps that utilize multiple DEX files isn’t a cheap process. You may see a slight increase in build times because of this.

Reporting Issues

Should you encounter any issues with this, please let us know by filing a bug report. Please remember that a bug report should contain the minimal amount of code (main.lua) to show the problem, along with config.lua and build.settings. If your project requires any artwork or sound, make sure they are also included in the submitted project.

Feel free to discuss this in our Forums.

See the article here: 

This post was originally published at Announcing Multidex Support for Android Builds in Corona SDK