答案 0 :(得分:0)
如果您正在使用Firebase身份验证,则需要在proguard文件中添加以下行:
-keepattributes Signature
-keepattributes *Annotation*
上述文档链接为:Optional: Configure ProGuard
此外,根据文档,如果使用DataSnapshot.getValue(Class)或DatabaseReference.setValue(Object)来读取和写入数据,则需要考虑在模糊处理后如何序列化和反序列化模型对象< / em>然后,您需要添加以下内容:
# Add this global rule
-keepattributes Signature
# This rule will properly ProGuard all the model classes in
# the package com.yourcompany.models. Modify to fit the structure
# of your app.
-keepclassmembers class com.yourcompany.models.** {
*;
}