Does anyone know why this happens? I see this crash reported by my app but I have no idea what it is.
java.lang.NoClassDefFoundError: android.app.ANRManagerP
This happens, because
and
Here is a list of devices, where I experienced more frequently the bug - so not only low end devices, be careful you will ignore it :-)
Lenovo A316i, N5i, V769M , G3 orro, V5, G3, X-2, F-G906, Z350, V10, G910, EVOLVEO StrongPhone D2, A70C, G9006, V13, C3000, n968, SM-T322, H9503, GT-H9503, S5, F1, Lenovo TP-6000, Galaxy Tab SM-T700C ...
Only thing you can do about this is to make your app responsive. Best way to do so is to use during development and testing Strict Mode, i.e., to do something like this:
public void onCreate() {
if (DEVELOPER_MODE) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork() // or .detectAll() for all detectable problems
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedSqlLiteObjects()
.detectLeakedClosableObjects()
.penaltyLog()
.penaltyDeath()
.build());
}
super.onCreate();
}