title: your content must have a listview whose id attribute is ' android.r.id.list ' .
body: <p>I write the program but when i run this program, the program has runtime error :( </p>
  
  <p>The error in LogCat is :</p>
  
  <pre><code>your content must have a listview whose id attribute is 'android.r.id.list'
  </code></pre>
  
  <p>I set <code>android:id="@android:id/list"</code> in <code>ListView</code> in activity_main.xml file.</p>
  
  <p>I write my code, Please read this and help me .</p>
  
  <p>MainActivity.java: </p>
  
  <pre><code>public class MainActivity extends ListActivity {
  
  private TextView text;
  private static final String[] items={"test", "test1" , "test2" , "test3" , "test4" , "test5" , "test6"};
  
  @Override
  public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      setListAdapter(new ArrayAdapter&lt;String&gt;(this,R.layout.row,R.id.label,items));
      text=(TextView)findViewById(R.id.selection);
  }
  public void onListItemClick(ListView parent,View v,int position,Long id){
      text.setText(items[position]);
  }
  }
  </code></pre>
  
  <p>activity_main.xml:</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="fill_parent"
     android:layout_height="fill_parent"
     android:orientation="vertical"&gt;
     &lt;TextView
         android:id="@+id/selection"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"/&gt;
     &lt;ListView
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@android:id/list"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:drawSelectorOnTop="false"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>row.xml : </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="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
     &lt;ImageView
         android:id="@+id/pic"
         android:padding="2dip"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:src="@drawable/pic"/&gt;
     &lt;TextView
         android:id="@+id/label"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Cheers.</p>