生成签名的APK时,值“ T”不是参考值错误

问题描述

在手机中运行时,我的代码没有问题。
但是当我启用proguard并想要生成已签名的APK时,该操作没有完成。
建立输出

Value "T" is not a reference value [proguard.evaluation.value.TopValue]  

我认为此问题与Firebase有关,因为添加Firebase库后我没有问题。
保护规则:

-keep class io.** { *; }
-dontwarn com.sothree.**
-keep class com.sothree.**
-keep interface com.sothree.**

-keep class com.google.gson.** { *; }
-keep public class com.google.gson.** {public private protected *;}
-keep class com.google.inject.** { *; }
-dontwarn com.squareup.okhttp.**
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {
    @retrofit2.http.* <methods>;
}
-keepattributes Signature
-keepattributes *Annotation*
-dontwarn sun.misc.**
-keep class com.google.gson.examples.android.model.** { <fields>; }


-keep class * implements com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
-keep class * implements com.google.gson.JsonDeserializer

# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
  @com.google.gson.annotations.Serializedname <fields>;
}

-keep class ***.Model.** { *; }
-keep class ***.Base.** { *; }
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes EnclosingMethod
-keepattributes InnerClasses

-dontwarn kotlinx.coroutines.**
-dontwarn co.pushe.plus.**

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)