NullPointerException at Home.onCreate
<p>I am trying to run a test program that allows a user to click a button and move to a different screen. I have the Home(First Activity) and Away(Second Activity) classes and a xml file specifying the layout for each. My source code is as follows:</p>

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

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Button create = (Button)findViewById(R.id.create);
    create.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v)
    {
        Intent intent = new Intent(Home.this, Away.class);
        startActivity(intent);
    }
});


    setContentView(R.layout.main);
}

}
</code></pre>

<p>And Away.java</p>

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

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.away);
}
}
</code></pre>

<p>I get a NullPointerException in the DDMS trace </p>

<pre><code>at Home.onCreate(line 17)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627)
</code></pre>

<p>Anyone see anything in my code that may be causing this?</p>
