I am a beginner to Android App Dev: I am getting a force close all the time
<p>I have recently just started learning how to develop android applications. I am am fairly proficient in Java, but I am still trying to get the hang of Android and xml stuffs. </p>

<p>So, thanks for the help in advance:D!</p>

<p>Right now, I am just trying to create an application that has an EditText widget and a button. Currently, all my code does is create an OnClickListener for the button, and define the OnClick method. I have no idea why it is force closing. I have experimented with a few small programs before(mainly experimenting with buttons), and I have also had this problem a few times, so I don't think it is unique to this code. </p>

<p>Here is the code:</p>

<pre><code>public class AdditionActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Toast.makeText(AdditionActivity.this, "Welcome to Addition Helper!", Toast.LENGTH_SHORT).show();

        final EditText answerBox = (EditText) findViewById(R.id.answerBox);
        final Button button = (Button) findViewById(R.id.button);
        final TextView problem = (TextView) findViewById(R.id.problem);
//        
        //problem.setText("5+4");

        button.setOnClickListener(new OnClickListener()
        {
            public void onClick(View v)
            {
                Toast.makeText(AdditionActivity.this, "Started", Toast.LENGTH_SHORT);
                String temp = problem.getText().subSequence(0, 1).toString();
                int first = Integer.parseInt(temp);
                temp = problem.getText().subSequence(2,3).toString();
                int second = Integer.parseInt(temp);
                int answer = first + second;
                if(Integer.parseInt(answerBox.getText().toString()) == answer) 
                    Toast.makeText(AdditionActivity.this, "Correct!!!!!", Toast.LENGTH_SHORT);
                else
                    Toast.makeText(AdditionActivity.this, "WRONG", Toast.LENGTH_SHORT);
            }
        });
    }
}
</code></pre>

<p>So if anyone knows why a beginner might be getting frequent force closes or if I am doing something wrong with my code, that would be GREAT! In my layout xml file, all I have are the EditText widget, the TextView widget, and the button.</p>

<p>Thanks again for your time, I really appreciate it.</p>
