Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误

Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误

当调用setText()方法时如果传入int型是不会被当成内容而是resourceID来使用!

所以报错!

解决方法:TextView.setText("" + arg)

转为String传入即可

原文地址:https://www.cnblogs.com/yejiurui/p/6814568.html