この行の問題点を教えてください: timerText.setText(seconds);
.
public class ShowTimer extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.timer_test_xml);
Timer myTimer = new Timer();
myTimer.schedule(new TimerTask() {
int seconds;
TextView timerText = (TextView) findViewById(R.id.TimerTestId);
@Override
public void run() {
seconds++;
timerText.setText(seconds);
}
}, 0, 1000);
}}