# Application classes that will be serialized/deserialized over Gson
-keep class com.myapplication.model.api.** { *; }
还要加上这个
# Gson uses generic type information stored in a class file when working with
# fields. Proguard removes such information by default, keep it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
1条答案
按热度按时间ymzxtsji1#
需要排除Gson上的序列化/反序列化类。对于包含类的包,如下所示
还要加上这个