知道为什么会发生这种崩溃吗?调试构建工作,但 Dexguard 版本在尝试登录用户时崩溃(使用登录signInWithCustomToken
)
更新:以下 proguard 设置修复了该问题
-keep class com.google.android.gms.internal.** { *; }
Firebase 版本:9.4.0
Caused by java.lang.IllegalArgumentException: field o.ս.ʽ has type android.support.v4.util.ArrayMap, got o.dj
at java.lang.reflect.Field.set(Field.java)
at com.google.android.gms.internal.zzaog$1.zza(Unknown Source)
at com.google.android.gms.internal.zzaog$zza.zzb(Unknown Source)
at com.google.android.gms.internal.zzamp.zza(Unknown Source:46000)
at com.google.android.gms.internal.zzafy.zze(Unknown Source:8000)
at com.google.firebase.auth.FirebaseAuth.(Unknown Source)
at com.google.firebase.auth.FirebaseAuth.(Unknown Source)
at com.google.android.gms.internal.zzaft.(Unknown Source)
at com.google.firebase.auth.FirebaseAuth.getCurrentUser(Unknown Source:19000)
Proguard 配置:
# Firebase
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.google.firebase.** { *; }
-keep class org.apache.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }
-dontwarn org.apache.**
-dontwarn org.w3c.dom.**
-keepresources string/default_web_client_id
-keepresources string/firebase_database_url
-keepresources string/gcm_defaultSenderId
-keepresources string/google_api_key
-keepresources string/google_app_id
-keepresources string/google_crash_reporting_api_key
-keepresources string/google_storage_bucket
# Supoort
-dontwarn android.support.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
-keep class android.support.design.** { *; }
-keep interface android.support.design.** { *; }