Android学习笔记--android.content.res.Resources$NotFoundException: String resource ID #0x0

错误提示:

 android.content.res.Resources$NotFoundException: String resource ID #0x0

错误原因:

在setText()中使用了int型的参数

错误解决方法:

setText()把整型转换成string类型,方法如下:

1.String s=String.valueOf(i);

2.String s=Integer.toString(i);

3.Striing s=""+i;

猜你喜欢

转载自blog.csdn.net/chenpeggy/article/details/41085799