У меня есть класс модели для хранения значения в базе данных Firebase, который отлично работает для приложения отладки, но когда я запускаю в режиме выпуска или генерирую выпуск .apk, в моей базе данных Firebase публикуются неправильные значения (фактический json не публикуется).
-KWqzFGEvUyCLx6obroBaddclose
a: "hLjOMC64NRdjqR0nfaUKhR3qz0l2"
b: "[email protected]"
Моя работа в Proguard
-keep @com.google.gson.annotations.Expose public class *
-dontwarn sun.misc.Unsafe
-dontwarn android.databinding.**
-keep class android.databinding.** { *; }
# Facebook library
-dontwarn javax.annotation.**
-dontwarn okio.**
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.common.internal.DoNotStrip *;
}
####################Retrofit##############
# Platform calls Class.forName on types which do not exist on Android to determine platform.
-dontnote retrofit2.Platform
# Platform used when running on RoboVM on iOS. Will not be used at runtime.
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
# Platform used when running on Java 8 VMs. Will not be used at runtime.
-dontwarn retrofit2.Platform$Java8
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
##########################################
-keep class com.firebase.** { *; }
-keep class org.apache.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }
-dontwarn org.w3c.dom.**
-dontwarn org.joda.time.**
-dontwarn org.shaded.apache.**
-dontwarn org.ietf.jgss.**
Предупреждения о сборке
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(c.a.a.g.b) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.