错误信息:
android.content.res.Resources$NotFoundException: String resource ID #0x42
原因:在调用函数的时候,本该使用String参数,但是在调用的时候却没有传递String类型的参数。
int progress =1;
Toast.makeText(Test.this, progress, Toast.LENGTH_SHORT).show();//报错
Toast.makeText(Test.this, progress+"", Toast.LENGTH_SHORT).show();//正确的写法