PreferenceScreen - - Exception - FLAG_ACTIVITY_NEW_TASK

后端 未结 1 771
既然无缘
既然无缘 2021-01-05 14:59

I am new at android developing.

The project is about implementing an AbstractAccountAuthenticator with an AbstractThreadedSyncAdapter to sync certain data on a serve

相关标签:
1条回答
  • 2021-01-05 15:29

    i had the same problem and have just found out, that if you change your preferences to:

    <?xml version="1.0" encoding="utf-8"?>
    <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
     <PreferenceCategory android:title="@string/pref_cat_general">
     </PreferenceCategory>
      <PreferenceScreen android:key="@string/pref_cat_scr_keygen" android:title="@string/pref_cat_scr_keygen_title" android:summary="@string/pref_cat_scr_keygen_summary">
       <intent android:action="android.intent.action.VIEW" android:targetPackage="com.android.clean" android:targetClass="com.android.clean.KeygenAct" />
      </PreferenceScreen>
    </PreferenceScreen>
    

    Then it works as expected. This is weird because I would expect PreferenceCategory to group items as its children... And why does it result with such unrelated (?) error?

    0 讨论(0)
提交回复
热议问题