I was incompletely implementing MultiDex support, so some of my classes weren’t in the proper dex file. To fix it, you have to do more than just set multiDexEnabled = true
in your defaultConfig
block. You also have to:
- Include
compile 'com.android.support:multidex:1.0.1'
in your dependencies - Have your Application class extend
MultiDexApplication
instead of justApplication
. Alternatively, you can callMultiDex.install()
inattachBaseContext()
of your application.
See https://developer.android.com/tools/building/multidex.html for more details.