我在我的项目中使用客户经理实施自定义帐户。一切都很好,但是当我在设置中的帐户和同步页面中单击我的帐户时,系统崩溃并重新启动。我通过 DDMS 追踪了它。这是我的Logcat:
09-15 20:51:39.899: E/(2895): Dumpstate > /data/log/dumpstate_sys_error
09-15 20:51:39.899: E/AndroidRuntime(2895): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread
09-15 20:51:39.899: E/AndroidRuntime(2895): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.providers.subscribedfeeds/com.android.settings.AccountSyncSettings}: android.content.res.Resources$NotFoundException: String resource ID #0x0
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.os.Handler.dispatchMessage(Handler.java:99)
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.os.Looper.loop(Looper.java:130)
09-15 20:51:39.899: E/AndroidRuntime(2895): at com.android.server.ServerThread.run(SystemServer.java:632)
09-15 20:51:39.899: E/AndroidRuntime(2895): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.content.res.Resources.getText(Resources.java:201)
09-15 20:51:39.899: E/AndroidRuntime(2895): at com.android.settings.AccountPreferenceBase.getLabelForType(AccountPreferenceBase.java:160)
09-15 20:51:39.899: E/AndroidRuntime(2895): at com.android.settings.AccountSyncSettings.onAuthDescriptionsUpdated(AccountSyncSettings.java:450)
09-15 20:51:39.899: E/AndroidRuntime(2895): at com.android.settings.AccountPreferenceBase.updateAuthDescriptions(AccountPreferenceBase.java:200)
09-15 20:51:39.899: E/AndroidRuntime(2895): at com.android.settings.AccountSyncSettings.onCreate(AccountSyncSettings.java:177)
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-15 20:51:39.899: E/AndroidRuntime(2895): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
09-15 20:51:39.899: E/AndroidRuntime(2895): ... 6 more
这是我用于帐户页面的 prefs.xml:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Dortan Preferences" />
</PreferenceScreen>
是什么导致了这个异常?