android – Find view in PlaceHolderView-ThrowExceptions

Exception or error:

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)

`

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 *