Intent putExtra() causes null pointer exception
<p>Hi I am trying to run simple activity my button on click looks like this</p>

<pre><code>public void onClick(View view){
     Intent intent = new Intent(this,SecondActivity.class);
     intent.putExtra("TextToGive", "Hello second activity");
     startActivityForResult(intent, 1);
}
</code></pre>

<p>When I click the button I get NullPointerException no activity found.If I delete the  intent.putExtra("TextToGive", "Hello second activity");
it works, does some one know why does this happens?</p>
