使用 FirebaseRemoteConfig 和 Play Services SDK 时出现 Proguard 错误
Proguard error when using FirebaseRemoteConfig and Play Services SDK
当我使用以下混淆器规则生成我的 APK 时
-keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**
-keep public class com.google.firebase.* {public *;}
-dontwarn com.google.firebase.**
我收到这个错误
Unexpected error while performing partial evaluation: Class =
[com/google/firebase/remoteconfig/FirebaseRemoteConfig] Method
= [getInstance()Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;]
Exception = [java.lang.IllegalArgumentException] (Can't find common
super class of [com/google/android/gms/internal/zzama] (with 2 known
super classes) and [com/google/android/gms/internal/zzamb$zzc] (with 1
known super classes))
Warning: Exception while processing task java.io.IOException:
java.lang.IllegalArgumentException: Can't find common super class of
[com/google/android/gms/internal/zzama] (with 2 known super classes)
and [com/google/android/gms/internal/zzamb$zzc] (with 1 known super
classes)
我找到了这个 URL http://proguard.sourceforge.net/manual/troubleshooting.html#superclass,它告诉我要添加缺失的 class。我不确定这里缺少哪个class。任何输入将不胜感激。
我发现了问题。这是因为我在 gradle 更新了 google 付费服务后还没有更新 firebase 的版本。请确保您的播放服务 sdk 和 firebase sdk 的版本相同
当我使用以下混淆器规则生成我的 APK 时
-keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**
-keep public class com.google.firebase.* {public *;}
-dontwarn com.google.firebase.**
我收到这个错误
Unexpected error while performing partial evaluation: Class = [com/google/firebase/remoteconfig/FirebaseRemoteConfig] Method
= [getInstance()Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;] Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [com/google/android/gms/internal/zzama] (with 2 known super classes) and [com/google/android/gms/internal/zzamb$zzc] (with 1 known super classes))Warning: Exception while processing task java.io.IOException: java.lang.IllegalArgumentException: Can't find common super class of [com/google/android/gms/internal/zzama] (with 2 known super classes) and [com/google/android/gms/internal/zzamb$zzc] (with 1 known super classes)
我找到了这个 URL http://proguard.sourceforge.net/manual/troubleshooting.html#superclass,它告诉我要添加缺失的 class。我不确定这里缺少哪个class。任何输入将不胜感激。
我发现了问题。这是因为我在 gradle 更新了 google 付费服务后还没有更新 firebase 的版本。请确保您的播放服务 sdk 和 firebase sdk 的版本相同