Application too big? Unable to execute dex: Cannot merge new index into a non-jumbo instruction

Your error is for the amount of strings (methods, members, etc) in a single dex file.

You need to compile you app using jumbo in dex with:

dex.force.jumbo=true

in project.properties

This increment the limit for strings in a dex files. And your project will probably compile.

Also with jumbo set, the is another limit of 64K only for methods in an single dex. If you get this limit in the future , you will need to remove some dependencies.

UPDATE: for build with Gradle:
In Gradle you can enable jumboMode also in the build.gradle file with:

dexOptions {
    jumboMode = true
}

Check:
Android Build: Dex Jumbo Mode in Gradle

Also with Gradle you can avoid the 64K limit for methods using multidex build, tutorial here:
https://developer.android.com/tools/building/multidex.html

Leave a Comment

tech