我正在嘗試使用AccountManager存儲帳戶信息並實施了身份驗證程序,但我一直收到類似下面的例外情況,導致手機崩潰。與示例代碼相比,這似乎是因爲我沒有(或特別需要)SyncAdapter和關聯的服務。使用AccountManager而不添加SyncAdapter有什麼竅門?沒有SyncAdapter的AccountManager?
問候
菲爾
I/AuthenticatorActivity(8526): onAuthenticationResult(true)
I/AuthenticatorActivity(8526): finishLogin()
W/dalvikvm(8108): threadid=13: thread exiting with uncaught exception (group=0x
4001b170)
E/AndroidRuntime(8108): Uncaught handler: thread android.server.ServerThread ex
iting due to uncaught exception
E/AndroidRuntime(8108): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
E/AndroidRuntime(8108): java.lang.NullPointerException
E/AndroidRuntime(8108): at com.android.settings.ManageAccountsSettings.o
nSyncStateUpdated(ManageAccountsSettings.java:187)
E/AndroidRuntime(8108): at com.android.settings.ManageAccountsSettings.o
nAccountsUpdated(ManageAccountsSettings.java:244)
E/AndroidRuntime(8108): at android.accounts.AccountManager$10.run(Accoun
tManager.java:826)
E/AndroidRuntime(8108): at android.os.Handler.handleCallback(Handler.jav
a:587)
E/AndroidRuntime(8108): at android.os.Handler.dispatchMessage(Handler.ja
va:92)
E/AndroidRuntime(8108): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(8108): at com.android.server.ServerThread.run(SystemSer
ver.java:435)
Briliiant問題 – Lyn 2011-05-20 07:06:45