I've this project and i use Firebase Realtime Database.
It's correct write this proguard rules?
-keepattributes Signature
-keepclassmembers class activity.** {
*;
}
-keepclassmembers class adapter.** {
*;
}
-keepclassmembers class fragment.** {
*;
}
-keepclassmembers class persistence.** {
*;
}
-keepclassmembers class services.** {
*;
}
The app work perfectly but when i release on PlayStore it seem that the query doesn't work. In my gradle i added
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
what did I do wrong?
You should -keep
for classes that will be serialized/deserialized by firebase, otherwise it won't be able to use reflection on those classes. -keepclassmembers
will only keep the members and obfuscate the name of the class, which is something you definitely don't want to do if your libs use reflection. Try replacing -keepclassmembers
with -keep
for those classes.
-keep class persistence.** {
*;
}