Android Multidex Support - Problem

Hi jMonkeys!!

When I try to compile my android project I get the next exception:

> UNEXPECTED TOP-LEVEL EXCEPTION:
> com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

Related to have too many methods in my current project. Looking for a solution I’ve found that you need to enable the multidex support in the building process. But the building process and all the files involved is dark magic for me :tired_face:.

Anyone has solved this issue or have an idea of how to deal with it??

Android has various dead code removal options, e.g. minification, proguard, etc. Might be worth looking into.

Hi Momoko,

Thans for the suggestion. I will investigate in that way.

The problem comes from third party libraries (google_play_services, android support v4, guava, etc…). This link has the number of method of some libraries:

My project uses Google Play Services + Guava + Android Support V4 and the sum of the three is more than 50.000 methods :scream:

Any ideas of how to enable the dead code removal options? I’m a bit lost, any guide will be welcome.