emulator throws unfortunately,myapp has stopped message
<p>I did a code for client server communication in android using JSON . I am using WAMP server and there is no error in PHP file. When I run my application emulator shows "Unfortunately,myapp has stopped". Please suggest  me ideas.I tried to fix but I cant.
 My java file:</p>

<pre><code>package com.example.http;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;



import android.app.ListActivity;
import android.net.ParseException;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends ListActivity {

JSONArray jArray;
String result = null;
InputStream is = null;
StringBuilder sb=null;
TextView tv;


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

 ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
//http post
try{
     HttpClient httpclient = new DefaultHttpClient();
     HttpPost httppost = new HttpPost("http://10.0.2.2/android_connect/read1.php");
     httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
     HttpResponse response = httpclient.execute(httppost);
     HttpEntity entity = response.getEntity();
     is = entity.getContent();
     }catch(Exception e){
         Log.e("log_tag", "Error in http connection"+e.toString());
    }
//convert response to string
try{
      BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
       sb = new StringBuilder();
       sb.append(reader.readLine() + "\n");

       String line="0";
       while ((line = reader.readLine()) != null) {
                      sb.append(line + "\n");
        }
        is.close();
        result=sb.toString();
        }catch(Exception e){
              Log.e("log_tag", "Error converting result "+e.toString());
        }
//paring data

try{
      jArray = new JSONArray(result);
      JSONObject json_data=null;
      for(int i=0;i&lt;jArray.length();i++){
             json_data = jArray.getJSONObject(i);
             String ct_name = json_data.getString("User_ID");
             tv = (TextView) findViewById(R.id.textView1);

             tv.setText(ct_name);

         }
      }
      catch(JSONException e1){
          Toast.makeText(getBaseContext(), "No City Found" ,Toast.LENGTH_LONG).show();
      } catch (ParseException e1) {
            e1.printStackTrace();
    }
}
}
</code></pre>

<p>and PHP file:</p>

<pre><code>&lt;?php
mysql_connect("localhost","root","");
mysql_select_db("androidhive");
$sql=mysql_query("select User_ID from opass");
while($row=mysql_fetch_assoc($sql))
$output[]=$row;
print(json_encode($output));
mysql_close();
?&gt;
</code></pre>

<p>logcat errors:</p>

<pre><code>04-21 22:43:33.502: E/AndroidRuntime(399): FATAL EXCEPTION: main
04-21 22:43:33.502: E/AndroidRuntime(399): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.http/com.example.http.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.os.Looper.loop(Looper.java:137)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.ActivityThread.main(ActivityThread.java:5041)
04-21 22:43:33.502: E/AndroidRuntime(399):  at java.lang.reflect.Method.invokeNative(Native Method)
04-21 22:43:33.502: E/AndroidRuntime(399):  at java.lang.reflect.Method.invoke(Method.java:511)
04-21 22:43:33.502: E/AndroidRuntime(399):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
04-21 22:43:33.502: E/AndroidRuntime(399):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
04-21 22:43:33.502: E/AndroidRuntime(399):  at dalvik.system.NativeStart.main(Native Method)
04-21 22:43:33.502: E/AndroidRuntime(399): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.ListActivity.onContentChanged(ListActivity.java:243)
04-21 22:43:33.502: E/AndroidRuntime(399):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:273)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.Activity.setContentView(Activity.java:1881)
04-21 22:43:33.502: E/AndroidRuntime(399):  at com.example.http.MainActivity.onCreate(MainActivity.java:40)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.Activity.performCreate(Activity.java:5104)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
04-21 22:43:33.502: E/AndroidRuntime(399):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
</code></pre>
