Content has view with id attribute 'android.R.id.list' that is not a ListView class
<p>I get this error when inflating the layout for a <code>PreferenceFragment</code>, but I can't get the reason, because I can't find any list in the layout.</p>

<p>Here is the (trivial) layout:</p>

<pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.myPath.SettingsFragment"&gt;
&lt;/FrameLayout&gt;
</code></pre>

<p>Here is the code that raise the Runtime exception:</p>

<pre><code>public class SettingsFragment extends PreferenceFragment {
    ...
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_settings, container, false);
    }
}
</code></pre>

<p>Here is the full exception stack:</p>

<pre><code>Unable to start activity ComponentInfo{com.myPath.SettingsActivity}:
   java.lang.RuntimeException: Content has view with id attribute 'android.R.id.list' 
   that is not a ListView class
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723)
    at android.app.ActivityThread.access$900(ActivityThread.java:172)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:5832)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
      Caused by: java.lang.RuntimeException: Content has view with id attribute 'android.R.id.list' that is not a ListView class
    at android.preference.PreferenceFragment.ensureList(PreferenceFragment.java:397)
    at android.preference.PreferenceFragment.getListView(PreferenceFragment.java:363)
    at android.preference.PreferenceFragment.bindPreferences(PreferenceFragment.java:345)
    at android.preference.PreferenceFragment.onActivityCreated(PreferenceFragment.java:185)
    at android.app.Fragment.performActivityCreated(Fragment.java:2122)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
    at android.app.BackStackRecord.run(BackStackRecord.java:833)
    at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
    at android.app.Activity.performStart(Activity.java:6257)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2621)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723) 
    at android.app.ActivityThread.access$900(ActivityThread.java:172) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:145) 
    at android.app.ActivityThread.main(ActivityThread.java:5832) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at java.lang.reflect.Method.invoke(Method.java:372) 
</code></pre>