【发布时间】:2014-07-01 07:14:03
【问题描述】:
我知道有很多这样的帖子,但我阅读了它们,但我的应用程序还没有工作。 我试图将 TextView 参数转换为 int。 我用这个:
int MyScore;
TextView score = (TextView) findViewById(R.id.highscore);
MyScore = Integer.parseInt(score.toString());
当我启动程序并丰富到这个地方时,这应该可以让我的程序崩溃,因为最后一行:MyScore = Integer.parseInt(score.toString());
我该如何解决这个问题?
【问题讨论】:
标签: string textview int ivalueconverter parseint