I\'m developing an Android app which reads data from MySQL database and I faced this error. I have this XML layout:
if you get the values in int you have to use string for that it is throwing the error
before
holder.villageName.setText(villageModelList.get(position).getVillageName());
holder.villageCount.setText(villageModelList.get(position).getPeopleCount());
holder.peopleCount.setText(villageModelList.get(position).getPeopleCount());
after
holder.villageName.setText(villageModelList.get(position).getVillageName());
holder.villageCount.setText(String.valueOf(villageModelList.get(position).getPeopleCount()));
holder.peopleCount.setText(String.valueOf(villageModelList.get(position).getPeopleCount()));
you can solve the error by adding the String.valueOf