title: Stop working in Android Studio 's Emoulator
body: <p>I have an easy problem with my little calculator in android studio(below is my code).</p>
  
  <p>When I run this in Emulator App Stop working. Can anybody help me?</p>
  
  <pre><code>package com.blah-blah.padideh.tamrin3;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.TextView;
  
  
  public class Activityone extends Activity {
  
      Button calculate=(Button) findViewById(R.id.button);
      TextView firstnumber=(TextView)findViewById(R.id.editText);
      TextView secondnumber=(TextView)findViewById(R.id.editText2);
      TextView Result=(TextView)findViewById(R.id.result);
      double num1,num2;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_farshid);
          calculate.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  num1=Double.parseDouble(firstnumber.getText().toString());
                  num2=Double.parseDouble(secondnumber.getText().toString());
                  Result.setText("Sum:\t"+(num1+num2)+"\n"+
                  "Multiple:\t"+(num1*num2)+"\n"+
                  "Minus:\t"+(num1-num2)+"\n"+
                  "Divide:\t"+(num1/num2)+"\n"+"Good Luck");
  
              }
          });
      }
  }
  </code></pre>