 <p>Your app crashing because the variable <code>maxInt</code> in plus1 is undefined. <code>maxInt</code>'s scope is local to <code>onCreate</code>. Also <code>final</code> variables are like <code>constant</code> variables in C. They can only get a value when you initialize them, meaning you can't change their value.</p> <p>Your maxInt should not be final and should be a global variable:</p> <pre><code>public class ScoreActivity extends Activity { int maxInt; protected void onCreate(Bundle savedInstanceState) { ... maxInt = Integer.parseInt(max); ... } public void plus1 (View V) { maxInt ++; } ... } </code></pre>