I have a Task defined in a class. Fatal exception \"NoClassDefFoundError\" is happening on following line
MyCuteTask myTask = new MyCuteTask(equations)
Its an google play services issue. (https://code.google.com/p/android/issues/detail?id=81083)
Workaround to avoid this crash till Google fixes it:
Add following into your Application#onCreate() method
try {
Class.forName("android.os.AsyncTask");
}
catch(Throwable ignore) {
// ignored
}
Note its Application#onCreate() and not Activity#onCreate()
Update: I can verify that above changes fixed these crashes for me.