i am new to android programming does anyone tell me why the program shows error that it cant resolve setText : this is the program.The last line it shows error like it cannot resolve settext and tostring.

     public void onButtonClick(View v){}
       EditText e1=(EditText)findViewById(R.id.editText);
    EditText e2=(EditText)findViewById(R.id.editText2);
     TextView t1=(TextView)findViewById(R.id.textView);
     int num1 = Integer.parseInt(e1.getText().toString());
    int num2 = Integer.parseInt(e2.getText().toString());
    int sum = num1 + num2;
    t1.setText(Integer.toString(sum));

