I'm getting a null pointer exception and the phone reboots when I call AccountManager.addAccountExplicitly, even though I have a service that returns a proper SyncAdapter. It's all setup in the manifest properly, etc .... just like others was saying to do. What other possible conditions generate this:
08-11 22:47:16.394: ERROR/AndroidRuntime(52): Uncaught handler: thread android.server.ServerThread exiting due to uncaught exception 08-11 22:47:16.394: ERROR/AndroidRuntime(52): *** EXCEPTION IN SYSTEM PROCESS. System will crash. 08-11 22:47:16.394: ERROR/AndroidRuntime(52): java.lang.NullPointerException 08-11 22:47:16.394: ERROR/AndroidRuntime(52): at com.android.settings.ManageAccountsSettings.onSyncStateUpdated(ManageAccountsSettings.java: 187) 08-11 22:47:16.394: ERROR/AndroidRuntime(52): at com.android.settings.ManageAccountsSettings.onAccountsUpdated(ManageAccountsSettings.java: 244) 08-11 22:47:16.394: ERROR/AndroidRuntime(52): at android.accounts.AccountManager$10.run(AccountManager.java:826) 08-11 22:47:16.394: ERROR/AndroidRuntime(52): at android.os.Handler.handleCallback(Handler.java:587) 08-11 22:47:16.394: ERROR/AndroidRuntime(52): at android.os.Handler.dispatchMessage(Handler.java:92) 08-11 22:47:16.394: ERROR/AndroidRuntime(52): at android.os.Looper.loop(Looper.java:123) 08-11 22:47:16.394: ERROR/AndroidRuntime(52): at com.android.server.ServerThread.run(SystemServer.java:428) I've got the SyncService that returns a valid object so I know that shouldn't be the problem: public class OAuthSyncService extends Service { // syncher extends AbstractThreadedSyncAdapter // code omitted for brevity ... @Override public IBinder onBind(Intent intent) { return syncer.getSyncAdapterBinder(); } } Thanks Richard -- 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