1

I have added multidex support to my application and confirmed that there are indeed two dex files in my apk. One is about 8MB and the other is 2MB. The problem is that some devices require the dex file to be smaller than that. Is there a way I can set the cutoff limit for when it makes another dex? So far the only options I have found are as follows:

android {
    dexOptions {
        incremental false
        preDexLibraries = false
        jumboMode = false
        javaMaxHeapSize "2048M"
    }
}

None of these seem to do what I need as the only one that takes a size is for the heap spaced used for compiling.

Thanks in advance!

BenDroid
  • 137
  • 1
  • 8

1 Answers1

1

There's no option to explicitly limit the size.
But you can limit the amount of methods in your main dex.
See my answer here for more details.

Community
  • 1
  • 1
Alex Lipov
  • 13,503
  • 5
  • 64
  • 87