Resource not found TextView

前端 未结 2 2024
闹比i
闹比i 2020-11-28 14:46

I am taking my first steps in Android and am starting with a very simple app which keeps track of progress through a knitting pattern and shows the instructions for the rele

相关标签:
2条回答
  • 2020-11-28 15:44

    mRow is an integer. When you call setText(mRow) on line 75, it thinks that you are trying to set the text with a String resource with ID = the value of mRow.

    Instead, do:

    tRow.setText(Integer.toString(mRow));
    
    0 讨论(0)
  • 2020-11-28 15:52

    You should always convert other values to string before setting it to textview, like

     txtX.setText(Integer.toString(intVal));
    
    0 讨论(0)
提交回复
热议问题