gpt4 book ai didi

android - Play 服务 9.2.1 中的 Firebase NullPointerException

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:43:08 26 4
gpt4 key购买 nike

我将应用程序中的 Google Play 服务从 8.4.0 更新到 9.2.1,然后开始每天多次看到以下崩溃:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes()' on a null object reference
at android.util.Base64.decode(Base64.java:118)
at com.google.firebase.iid.zzg.zzkl(Unknown Source)
at com.google.firebase.iid.zzg.zzh(Unknown Source)
at com.google.firebase.iid.zzd.zzb(Unknown Source)
at com.google.firebase.iid.zzd.zzcxa(Unknown Source)
at com.google.firebase.iid.zzd.zzbmu(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceId.zzcww(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceIdService.zzaa(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceIdService.zzm(Unknown Source)
at com.google.firebase.iid.zzb$2.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

我没有明确包含 Firebase,也没有从 GCM 迁移,但我的应用程序中确实有谷歌服务。我认为 Firebase 是通过依赖于我的其他播放服务集成或 google-services 插件而引入的。这是我的 build.gradle 文件的 fragment :

compile 'com.google.android.gms:play-services-analytics:9.2.1'
compile 'com.google.android.gms:play-services-appindexing:9.2.1'
compile 'com.google.android.gms:play-services-places:9.2.1'
compile 'com.google.android.gms:play-services-gcm:9.2.1'

这次崩溃似乎与 this one 非常相似但它来自 getInstance() 而不是 getToken() 所以我想知道是否有人知道我是否缺少集成或类似的东西?我希望唯一的答案不是等待谷歌修复。

更新:我通过仪表板将 Firebase 添加到我的应用程序,然后生成了一个新的 google-services.json 文件,重新打包了我的应用程序并发布了一个补丁。这似乎并没有解决问题,因为我仍然在新版本的 Crashlytics 中看到问题。

更新 2:我仍然没有找到解决方案,但我注意到这些崩溃在 Crashlytics 中逐渐减少。我第一天有 40 个,第二天有 30 个,第三天有 10 个,现在下降到大约 4 个。这让我相信这个错误只影响新用户或更新用户,其中有很多最初是因为我的用户的应用程序升级到新版本。我仍然认为这是谷歌端的一个错误,希望他们能修复,但至少它没有我最初想象的那么普遍。

最佳答案

正如我在更新中所描述的,几天后我发现这些错误越来越少,直到几周后的现在,我再也看不到它们了。所以我猜答案是,这会间歇性地影响正在更新其应用程序的用户,并最终自行消失。开发者方面很可能不需要采取任何行动。

关于android - Play 服务 9.2.1 中的 Firebase NullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38405848/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com