ListView force app to close down
<p>I'm trying to get a ListView to work, but I get a message on the screen that need to close down the app! I'm searching for error, but I can't find any! Perhaps it's inside the layout? I'm not sure about if I should have a ListView inside there or if this is created cdynamic? What am I doing wrong? I'm also going to use a onClick method, but I guess thats a miner problem in this case!? Preciate some help! Thanks!</p>

<pre><code>public class Activity_3 extends ListActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    String[] projection = {ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone._ID};

    // Get a cursor with all people
    Cursor cursor = managedQuery(ContactsContract.Contacts.CONTENT_URI,
            projection, null, null, null);

    startManagingCursor(cursor);

    ListAdapter adapter = new SimpleCursorAdapter(this, R.layout.activity_3, cursor, new String[] {ContactsContract.Contacts.DISPLAY_NAME}, new int[] {R.id.contactItem });

    setListAdapter(adapter);
}
}
</code></pre>

<p>The layout</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" &gt;

&lt;ListView
    android:id="@+id/contactList"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" &gt;
&lt;/ListView&gt;

&lt;TextView android:id="@+id/contactItem" &gt;
&lt;/TextView&gt;

&lt;/LinearLayout&gt;
</code></pre>
