The application expliintent(process.com.nakool) has stopped unexpectly ,please try again..force close
<p>I used this code on android 2.2,but while running this code .I am getting the error as "The application expliintent(process.com.nakool) has stopped unexpectly ,please try again..force close.</p>

<p>When i comment the statement "b.setOnClickListener(this);" .the code is processing successfully..Dont know why I am getting error on this line..pls guide me</p>

<p><code>enter code here</code></p>

<pre><code>public void onCreate(Bundle savedInstanceState) {


    Button b=(Button)findViewById(R.id.button1);
    b.setOnClickListener(this);

    i=new Intent(this,activitynew.class);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
}
public void onClick(View v)
{}}
</code></pre>
