android – Find view in PlaceHolderView-ThrowExceptions

Exception or error:

I have an infinite place holder view ( 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(
        at android.content.res.HwResources.getText(
        at android.widget.TextView.setText(


How to solve:

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.

Leave a Reply

Your email address will not be published. Required fields are marked *