帐户同步设置中的ResourcesNotFoundException

时间:2013-09-15 16:36:11

标签: android preferences accountmanager

我在项目中使用客户经理实施自定义帐户。一切都很好但是当我在帐户中单击我的帐户并在设置系统中同步页面时崩溃并重新启动。我通过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>

导致此异常的原因是什么?

0 个答案:

没有答案