Android – recyclerview project content is not visible

Use recyclerview to display data from JSON. Each recycler item contains an image and several textviews

But whenever I run my application, I get the recyclerview list, but I don't get the content and image

What could be the reason?

proguard-rules.pro:

-dontwarn okio.**
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclassmembers,allowobfuscation interface * {
    @retrofit.http.** <methods>;
}

-dontwarn com.squareup.okhttp.**
-keepattributes Signature

resolvent:

Your Proguard is messing up your POJO. It's confused, so it doesn't work anymore. That's why it also happens after you enable minify for debug build

You should keep all POJOs and their members because they are used by reflection. As I see from your code, you need to at least add them

-keep class **.CountryPojo { *; }

However, since this may not be all, you should keep the members of all classes and packages used for POJOs

-keep class pkg.of.the.pojos.** { *; }

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>