title: how to add button in android studio?
body: <p><strong>Whenever i click on submit button the app crashes,i am a beginner and  followed a youtube video to this</strong></p>
  
  <p><em>here is the code</em></p>
  
  <pre><code>public void onButtonClick(View v) {
      EditText e1 = (EditText) findViewById(R.id.textView);
      EditText e2 = (EditText) findViewById(R.id.textView2);
      TextView t1 = (EditText) findViewById(R.id.textView3);
      int num1 = Integer.parseInt(e1.getText().toString());
      int num2 = Integer.parseInt(e2.getText().toString());
      int sum = num1 + num2;
      t1.setText(Integer.toString(sum));
  }
  </code></pre>