You need to cast your number to a string when setting the text of your text view:
t.setText(i);
needs to be
t.setText(String.valueOf(i));
The compiler reads the integer as a pointer to a resource, hence the error:
android.content.res.Resources$NotFoundException: String resource ID #0x6