Both activities are in the same package
Second activity uses second layout file
setContentView(R.layout.main2);
Errors on this line
Just for the protocol, You could also use:
TextView.setText("" + intVar) instead of TextView.setText(intVar)
TextView.setText("" + intVar)
TextView.setText(intVar)