今天在写项目的时候出现了一个错误 Resources$NotFoundException,记录下来
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:342)
at android.widget.TextView.setText(TextView.java:4168)
首先我考虑的是TextView没有实例化 也就是findviewbyId 显然不是这么幼稚的错误
其次我就考虑是不是ID写错了,导致无法找到实例呢 ? ButterKnife 不会犯这种错误啊,
最后我发现我在setText(int) 写了一个int值 果断转为String 结果很骚,再次运行没有问题了
不知道有没有帮到您