Android app crash NoClassDefFoundError on Samsung Lollipop devices

与世无争的帅哥 提交于 2019-11-29 14:51:06

The fix for this was to disable pre-dexing:

dexOptions {
    preDexLibraries false
}

in the app build.gradle. Inspiration for this came from this link regarding a Picasso class not found error on Lollipop: see here

Its not entirely clear to me why disabling pre-dexing solves the problem, but I can only theorize that there is some optimization going on with the build process that affects the way classes are ordered in the dex files of the apk that then affects the app installation on these Samsung Lollipop devices. In theory ART should take care of all of that, but clearly there is a dependency between pre-dex optimization and some Lollipop devices.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!