MultiDex NoClassDefFound error

Your AppWrapper class fails to load because the retrofit.ErrorHandler interface is not included in main dex file.

How do you calculate which classes to put in your main-dex-list file?
There’s a script that can generate it for you. I wrote a blogpost that shows how to use it.

Update (10/31/2014):
Gradle plugin v0.14.0 now does it automatically. See my answer here.

Update (24/04/2017):
The developer guide explains how to pick specific classes with a gradle option if it doesn’t pick all the right ones automatically.

Leave a Comment