Resource$NotFoundException when Setting value to TextView

when we pass or set an value (integer,float,double) anything except string that time we get that exception.

Android assume it as resource id that’s why this exception occurs.

  • Solution: Try converting those value to String like
  1. textview.settext(String.valueof(  ));
  2. textview.settext(Integer.toString());