Error : Unfortunately My Fist App has stopped working
<p>I am trying to develop a chat room for an Android App. </p>

<p>On the first screen, a <code>list view</code> is displayed. On clicking on one of the items in <code>listview</code>, an activity is launched in whichh I am displaying two buttons called as <code>Chat</code> and <code>Draw</code>. When I click on chat I am launching another activy called as <code>DisplayMessageActiviy</code> in which there is an area for <code>EditText</code> and a button called as <code>Send</code>. </p>

<p>However, when I click on <code>Chat</code>, I am getting the following error ::
<code>Unfortunately My Fist App has stopped working</code>.</p>

<p>I am using the following lines of code :</p>

<p><code>SingleListActivity.java</code> :</p>

<pre><code>//chatMessage is the xfunction to be run on clicking on chat button
public void chatMessage(View view) 
{
    Intent intent_chat = new Intent(this, DisplayMessageActivity.class);
    //EditText editText = (EditText) findViewById(R.id.edit_message);
    //String message = editText.getText().toString();
    //intent_chat.putExtra(EXTRA_MESSAGE, message);
    startActivity(intent_chat);
}
</code></pre>

<p><code>DisplayMessageActivity.java</code> :</p>

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

@SuppressLint("NewApi")

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

}

public void displayChat(View view) 
{
    onResume();
}

@Override
protected void onResume() {
    // TODO Auto-generated method stub
    super.onResume();
    TextView text = (TextView) findViewById(R.id.chatWindow);
    EditText editBox = (EditText)findViewById(R.id.chatBox);

    String str = text.getText().toString(); 
    text.setText(str +"\n"+editBox.getText().toString());
    editBox.setText("");       

    editBox.setHint("Type in here");

}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case android.R.id.home:
        NavUtils.navigateUpFromSameTask(this);
        return true;
    }
    return super.onOptionsItemSelected(item);
}
</code></pre>

<p>}</p>

<p>I am getting the following error in LogCat :</p>

<pre><code>01-30 10:37:40.055: E/AndroidRuntime(724): FATAL EXCEPTION: main
01-30 10:37:40.055: E/AndroidRuntime(724): java.lang.IllegalStateException: Could not execute method of the activity
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.view.View$1.onClick(View.java:3597)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.view.View.performClick(View.java:4202)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.view.View$PerformClick.run(View.java:17340)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.os.Handler.handleCallback(Handler.java:725)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.os.Looper.loop(Looper.java:137)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.app.ActivityThread.main(ActivityThread.java:5039)
01-30 10:37:40.055: E/AndroidRuntime(724):  at java.lang.reflect.Method.invokeNative(Native Method)
01-30 10:37:40.055: E/AndroidRuntime(724):  at java.lang.reflect.Method.invoke(Method.java:511)
01-30 10:37:40.055: E/AndroidRuntime(724):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-30 10:37:40.055: E/AndroidRuntime(724):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-30 10:37:40.055: E/AndroidRuntime(724):  at dalvik.system.NativeStart.main(Native Method)
01-30 10:37:40.055: E/AndroidRuntime(724): Caused by: java.lang.reflect.InvocationTargetException
01-30 10:37:40.055: E/AndroidRuntime(724):  at java.lang.reflect.Method.invokeNative(Native Method)
01-30 10:37:40.055: E/AndroidRuntime(724):  at java.lang.reflect.Method.invoke(Method.java:511)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.view.View$1.onClick(View.java:3592)
01-30 10:37:40.055: E/AndroidRuntime(724):  ... 11 more
01-30 10:37:40.055: E/AndroidRuntime(724): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.myfirstapp/com.example.myfirstapp.DisplayMessageActivity}; have you declared this activity in your AndroidManifest.xml?
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1618)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
01-30 10:37:40.055: E/AndroidRuntime(724):  at   android.app.Activity.startActivityForResult(Activity.java:3370)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.app.Activity.startActivityForResult(Activity.java:3331)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.app.Activity.startActivity(Activity.java:3566)
01-30 10:37:40.055: E/AndroidRuntime(724):  at android.app.Activity.startActivity(Activity.java:3534)
01-30 10:37:40.055: E/AndroidRuntime(724):  at com.example.myfirstapp.SingleListActivity.chatMessage(SingleListActivity.java:42)
01-30 10:37:40.055: E/AndroidRuntime(724):  ... 14 more
</code></pre>

<p><code>AndroidManifet.xml</code> ::</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" &gt;

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

&lt;application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" &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;activity
        android:name=".SingleListItem"
        android:label="@string/title_activity_single_list_item" &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;activity
        android:name=".SingleListActivity"
        android:label="@string/title_activity_single_list" &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;activity
        android:name="com.example.appfirst.DisplayMessageActivity"
        android:label="@string/title_activity_display_message"
        android:parentActivityName="com.example.myfirstapp.MainActivity" &gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.myfirstapp.MainActivity" /&gt;
    &lt;/activity&gt;
&lt;/application&gt;
</code></pre>

<p>
Can someone help me to sort out the error ??Thanks and Regards.</p>
