Error while calling next activity in android?
<p>this is my first activity code:</p>

<pre><code>public class hello extends Activity
{
/** Called when the activity is first created. */

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

    Button button = (Button) findViewById(R.id.imageButton1);

    button.setOnClickListener(new View.OnClickListener()
    {
        public void onClick(View v)
        {
            // Perform action on click
            Intent i = new Intent(hello.this,Selectmsg.class);

            startActivity(i);           
        }
    });
  }
}
</code></pre>

<p>following is my next activity code:</p>

<pre><code>public class Selectmsg extends Activity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main1);

    }
}
</code></pre>

<p>but i am occurring error.it closing forcefully.,its not working.i just want to call next activity.and i also written driver for next activity in Androidmanifest.so please help me to remove error..
Thanks in Advance--</p>
