title: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
body: <p>I know that there has been simialr questions but I can't make it work even though I look at those. The error message is: </p>
  
  <blockquote>
    <p>java.lang.RuntimeException: Your content must have a ListView whose id
    attribute is 'android.R.id.list'</p>
  </blockquote>
  
  <p>. I have tried to change the id to list. In another. This what the code looks like:</p>
  
  <pre><code> public class committeeFragment extends SherlockListFragment {
  
      private CommitteeAdapter adapter;
  
      public void onActivityCreated(Bundle savedInstanceState) {
          super.onActivityCreated(savedInstanceState);
          adapter = new CommitteeAdapter(getActivity().getApplicationContext());
          setListAdapter(adapter);
      }
  
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          return inflater.inflate(R.layout.fragment_committee, container, false);
      }
  
      public void
      refreshList() {
          adapter.updateDataSet();
          adapter.notifyDataSetChanged();
      }
  }
  </code></pre>
  
  <p>It's using the following adapter:</p>
  
  <pre><code>    public class CommitteeAdapter extends BaseAdapter {
      private
      ArrayList&lt;StudentCommittee&gt; committeeList;
      private Context context;
  
      public CommitteeAdapter(Context context) {
          this.context = context;
          CommitteeDatabaseAdapter dbAdapter = new CommitteeDatabaseAdapter(context);
          committeeList = dbAdapter.readAllCommittees();
      }
  
      public void updateDataSet() {
          CommitteeDatabaseAdapter dbAdapter = new CommitteeDatabaseAdapter(context);
          committeeList = dbAdapter.readAllCommittees();
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
          StudentCommittee committee = committeeList.get(position);
  
          View v = vi.inflate(R.layout.list_item_committee, null);
          TextView sectionName = (TextView) v.findViewById(R.id.committee_namn);
  
          sectionName.setText(committee.getName());
          return v;
      }
  
      @Override
      public int getCount() {
          return committeeList.size();
      }
  
      @Override
      public StudentCommittee getItem(int position) {
          return committeeList.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  }
  </code></pre>
  
  <p>Here is the xml-file that specifies the list(fragment_committee):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:orientation="vertical"
       android:tag="@string/tag_fragment_committee"
       android:background="@color/white" &gt;
  
       &lt;TextView
           style="@style/AppsolutText.Headline"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:text="Festerier" /&gt;
  
        &lt;View
           android:layout_width="fill_parent"
           android:layout_height="2dp" 
           android:background="@drawable/divider_sliding_menu_item"/&gt;
  
       &lt;ListView
           android:id="@+id/list"
           android:layout_width="match_parent"
           android:layout_height="wrap_content" /&gt;
  
       &lt;TextView 
           style="@style/AppsolutText.Normal"
           android:id="@android:id/empty"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:text="Uppdatera för att se en lista över festerier och fadderier. Kräver internetanslutning."/&gt;
  
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the xml for the list item:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:orientation="horizontal" &gt;
  
       &lt;ImageView
           android:id="@+id/committee_symbol"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:layout_weight="0"
           android:paddingBottom="10dp"
           android:paddingRight="10dp"
           android:paddingTop="10dp" /&gt;
  
       &lt;TextView
           android:id="@+id/committee_namn"
           style="@style/AppsolutText.ListHeader"
           android:layout_width="0dp"
           android:layout_height="wrap_content"
           android:layout_weight="1" /&gt;
  
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I hope that you can figure out what's wrong. I have another listview that has the same id (list) in another xml-file within the project. I don't know if that's a problem. Please help me solve the problem.</p>