"the application has stopped unexpectedly android please try again"
<p>I have wrote this simple code but i don know why my emulator always shows me this error:"the application has stopped unexpectedly android please try again". I tried to get rid of it but was not done successfully  help me please thanks.</p>

<pre><code>public class MainActivity extends Activity {

int counter;
Button add, sub;
TextView display;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    counter = 0;
    sub = (Button) findViewById(R.id.bSub);
    display = (Button) findViewById(R.id.tvDisplay);
    add = (Button) findViewById(R.id.bAdd);


    // *****onClick method****//
    add.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            counter = counter + 1;
            display.setText("Your Total is " + counter);
        }
    });

}
}



  //my xml//



&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
 tools:context=".MainActivity" &gt;

&lt;TextView
    android:id="@+id/tvDisplay"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:gravity="center"
    android:text="@string/total"
    android:textSize="45sp" /&gt;

&lt;Button
    android:id="@+id/bAdd"
    android:layout_width="250dp"
    android:layout_height="wrap_content"
    android:text="@string/add" /&gt;

&lt;Button
    android:id="@+id/bSub"
    android:layout_width="250dp"
    android:layout_height="wrap_content"
    android:text="@string/sub" /&gt;

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

<p>my manifest</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.thenewbostonnn"
android:versionCode="1"
android:versionName="1.0" &gt;

&lt;uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="16" /&gt;

&lt;application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;activity
        android:name="com.example.thenewbostonnn.MainActivity"
        android:label="@string/app_name" &gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;/application&gt;

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