0

I have an infinite place holder view (https://github.com/janishar/PlaceHolderView) and my card layout looks like this and java class this. Fields imageView and category resolved but likes TextView doesn't. The exception which I getting: `

android.content.res.Resources$NotFoundException: String resource ID #0x0
        at android.content.res.Resources.getText(Resources.java:430)
        at android.content.res.HwResources.getText(HwResources.java:463)
        at android.widget.TextView.setText(TextView.java:6019)
        at io.onhigh.funtech.android.memorld2.ui.feedv2.dto.ContentView.onResolved(ContentView.java:25)

`

Kadzhaev Marat
  • 1,278
  • 1
  • 19
  • 33

1 Answers1

1

your likes is of type int. Android thinks you're referring to the resource ID. It tries to look up the resource but fails to do so. A solution is to call toString() on the int likes property.

Zun
  • 1,553
  • 3
  • 15
  • 26