This problem has been bothering me for a bit and I cannot find a satisfactory solution.
Many times (not always) in the creation of a specific object on the Android e
I think I have cracked it.
The thread used to load ads in my app would throw an uncaught exception early on which, in a way I don't 100% understand, caused the worker thread to stop responding. When the program tried to create the AsyncTask the class loader was not working.
Moral, take a vacation and come back with fresh eyes.
Try adding a simple constructor in StatisticsProvider and check.
OK, looks like it is a problem with one of the versions of Google play Services. See https://code.google.com/p/android/issues/detail?id=81083
Looks like a work around might be to add:
try {
Class.forName("android.os.AsyncTask");
}
catch(Throwable ignore) {
// ignored
}
into your Application#onCreate()
If you don't already have a Application class then create a class that extends from android.app.Application and
#onCreate()<application android:icon="@drawable/icon_game_launcher"
android:label="@string/app_name"
android:name="au.com.mycompany.myapp.MyApplication">