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

前端 未结 7 842
清酒与你
清酒与你 2020-11-21 08:18

I\'m developing an Android app which reads data from MySQL database and I faced this error. I have this XML layout:



        
7条回答
  •  野性不改
    2020-11-21 08:34

    If we get the value as int and we set it to String, the error occurs. PFB my solution,

    Textview = tv_property_count;
    int property_id;
    tv_property_count.setText(String.valueOf(property_id));
    

提交回复
热议问题