gpt4 book ai didi

Android:NetworkInfo.isConnected() 上的 NullPointerException 与 Firebase

转载 作者:可可西里 更新时间:2023-11-01 19:08:11 26 4
gpt4 key购买 nike

有时,在不同的手机(Android 7)上会出现这种崩溃:

Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in com.google.firebase.iid.zzae@3c68978
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1178)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6321)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
at com.google.firebase.iid.zzad.zzchr(Unknown Source)
at com.google.firebase.iid.zzae.onReceive(Unknown Source)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1163)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6321)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

你以前见过这个错误吗?我不知道如何纠正这个错误...

非常感谢你们!

最佳答案

此问题已在 11.8.0 中修复。请更新您的 Firebase SDK 版本。引用https://firebase.google.com/support/release-notes/android#20171218

关于Android:NetworkInfo.isConnected() 上的 NullPointerException 与 Firebase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47650000/

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