THis is not the first time I've written a sync adapter, but thi is the first time I've seen this problem. I can't find were it might be happening and I'm wondering if anyone else has seen this.
The problem is that it seems to be internal to the SyncAdapter. I already know that the likely reason for the Handler exception is a UI call in a non UI thread, but the trouble is that I am not using any UI in the syncadapter (not even a toast). I have heard that its possible for another thread to die and cause a cascade that is not obvious, but it that is happening here, there are no clues I can see. So... if anyone can shed some light on this issue, I've love to hear what you have to say. 12-18 12:26:20.347: E/AndroidRuntime(22903): FATAL EXCEPTION: SyncAdapterThread-1 12-18 12:26:20.347: E/AndroidRuntime(22903): java.lang.ExceptionInInitializerError 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.content.ContentProvider.attachInfo(ContentProvider.java:929) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.app.ActivityThread.installProvider(ActivityThread.java:4237) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.app.ActivityThread.acquireProvider(ActivityThread.java:4035) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:1612) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.content.ContentResolver.acquireProvider(ContentResolver.java:949) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.content.ContentResolver.acquireContentProviderClient(ContentResolver.java:984) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:245) 12-18 12:26:20.347: E/AndroidRuntime(22903): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.os.Handler.<init>(Handler.java:121) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.os.AsyncTask$InternalHandler.<init>(AsyncTask.java:607) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.os.AsyncTask$InternalHandler.<init>(AsyncTask.java:607) 12-18 12:26:20.347: E/AndroidRuntime(22903): at android.os.AsyncTask.<clinit>(AsyncTask.java:190) 12-18 12:26:20.347: E/AndroidRuntime(22903): ... 7 more -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en