Wednesday, 1 July 2015

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


If you got this below error when you were changing a textview's text:

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

The reason is you code is like this:

    textView.setText(1);

You can't give it a number, because this api treat INT as R.id.xxxxxx

So the solution is:

   textView.setText(String.valueOf(1));






No comments:

Post a comment