【问题标题】:ANR because of Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE in FirebaseInstanceIdReceiver由于 FirebaseInstanceIdReceiver 中的 Intent { act=com.google.android.c2dm.intent.RECEIVE 广播而导致 ANR
【发布时间】:2022-04-02 01:21:14
【问题描述】:

**意图广播 { act=com.google.android.c2dm.intent.RECEIVE flg=0x11000010 pkg=in.swiggy.android cmp=in.swiggy.android/com.google.firebase.iid.FirebaseInstanceIdReceiver (有额外的)}

com.google.firebase.iid.FirebaseInstanceIdReceiver**

在 Android 8 ND 8.1 设备中

来自 google play 控制台的堆栈跟踪:

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x73479f50 self=0x79546c0a00
  | sysTid=28427 nice=0 cgrp=default sched=0/0 handle=0x7959c449c8
  | state=S schedstat=( 364660644 78678379 421 ) utm=28 stm=8 core=1 HZ=100
  | stack=0x7fd16fd000-0x7fd16ff000 stackSize=8MB
  | held mutexes=
  #00  pc 000000000007083c  /system/lib64/libc.so (__epoll_pwait+8)
  #01  pc 0000000000020670  /system/lib64/libc.so (epoll_pwait+48)
  #02  pc 00000000000165a4  /system/lib64/libutils.so (_ZN7android6Looper9pollInnerEi+148)
  #03  pc 0000000000016484  /system/lib64/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+116)
  #04  pc 000000000016053c  /system/lib64/libandroid_runtime.so (???)
  #05  pc 00000000001efb8c  /system/framework/arm64/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+140)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:325)
  at android.os.Looper.loop (Looper.java:142)
  at android.app.ActivityThread.main (ActivityThread.java:6938)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

升级到 Android Oreo 后我遇到了这个问题。有什么解决办法吗?

【问题讨论】:

标签: android firebase-cloud-messaging android-8.0-oreo android-8.1-oreo


【解决方案1】:

我们也经常遇到这些 ANR,唯一减少它的修复方法是将依赖项更新到 21.1.0 的建议删除了对 FirebaseInstanceId 的依赖项,这始终是这些崩溃日志的一部分:https://github.com/firebase/firebase-android-sdk/issues/2014#issuecomment-820390156

所以,从

更新这些依赖项
"com.google.firebase:firebase-iid:20.1.1”
"com.google.firebase:firebase-messaging:20.1.2"

"com.google.firebase:firebase-iid:21.1.0”
"com.google.firebase:firebase-messaging:21.1.0"

结果:

还没有完全摆脱它,但我希望它对你们中的一些人有所帮助。

【讨论】:

    猜你喜欢
    • 2022-11-28
    • 1970-01-01
    • 2017-05-13
    • 2021-12-17
    • 1970-01-01
    • 1970-01-01
    • 2017-01-21
    • 2018-03-01
    • 1970-01-01
    相关资源
    最近更新 更多