Settings

Theme

Solving Android’s 65K Limit: The Unbearable Lightness of Multidexing

blog.safedk.com

37 points by shiraabel · 3 comments

Reader

3 threads
Zigurd

The first, second, and third thing I would try is dividing up the app. I suppose there are things that might be better off as a monolith, like maybe a really powerful CAD app with an in-memory data model.

But in most cases, where the data model is in a SQLite database, you can put that in a ContentProvider and have multiple apps access it.

"But that's not how we designed it." OK. OK. Just saying. It's a mobile device. It has constraints. It also has benefits for implementers who don't try to just steamroll the limitations.

on_and_off

MultiDex brings its own problems with it. First it makes compilation times even worse, but it can also lead to unpredictable crashes during class load for Android < 5.0. Before using it, you really need to try to get under the 65k limit instead.

offerico

Good post. I am using Proguard and still have more than 50K methods. Good to know there are other solutions

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection