java.lang.IllegalStateException: Must specify preferenceTheme in theme

前端 未结 1 1465
醉话见心
醉话见心 2021-01-29 03:09

I am trying to load a PreferenceFragment (PreferenceFragmentCompat) in an application running on API 16, but every time I attempt to load the fragment I get the following error:

相关标签:
1条回答
  • 2021-01-29 03:31

    I managed to fix it. The problem was my activity that was loading the fragment didn't have the theme set.

    <activity android:name=".controllers.MainActivity" android:theme="@style/AppTheme.Base" />

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