更新时间:2021-07-17 22:46:01
这似乎与处理程序和消息传递有关...基于以下来自堆栈跟踪的片段, gms
正在看到 DeadObjectException
当试图在looper上处理消息
。即使堆栈跟踪显示 gms
相关,它可能会由您的代码触发。
This seems related to handlers and message passing...Based on below snippet from your stack trace, gms
is seeing a DeadObjectException
when trying to process a message
on the looper. Even though the stack trace shows gms
related, it could have be triggered by your code.
at com.google.android.gms.internal.q$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
如果 message
它试图访问属于一个已经退出/终止的进程。做一个代码搜索所有处理程序 sendMessage *
邮件调度电话,通过你的代码。即使这可能无法捕获所有实例,因为一些 gms
调用可能会导致处理函数
消息分派。
This exception is seen if the message
its trying to access belong to a process that has since exited/killed. Do a code search for all handler sendMessage*
message dispatch calls, through out your code. Even this may not catch all instances as some gms
calls could result in handler
message dispatches.
另外,检查是否有任何后台服务或分配 handler
消息的活动正在退出。 Android可能会销毁它们取决于生命周期状态,请尝试覆盖 onDestroy $ c>
。
Also, check if any of your background services, or activities that allocated handler
messages, are exiting. Android could be destroying them depending on life cycle states, try overriding onDestroy
.
在所有活动/服务中,您拨打 gms
api,检查你创建的对象并传递给 gms
;如果他们死亡,那些对象不再有效。
In all your activities/services, any where you make calls to gms
api, check the objects you create and pass to gms
; If they die, those objects are not valid any more.