Both activities are in the same package
Second activity uses second layout file
setContentView(R.layout.main2);
Errors on this line
face with the same error
finally i found its not a error due to your xml layout
somewhere in your code set TextView.setText(int)
TextView.setText(int)
try TextView.setText( Integer.toString(int));
TextView.setText( Integer.toString(int));