请帮我,我得到了andriod.os.deadObjectException [英] Plz help me i got the andriod.os.deadObjectException

查看:148
本文介绍了请帮我,我得到了andriod.os.deadObjectException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Andriod中开发应用程序,因为我收到了异常(andriod.os.DeadObjectException),突然该应用程序将被杀死,请问如何解决该异常请帮助我

i develop the application in andriod, In that i got the Exception (andriod.os.DeadObjectException) is came, suddenly the app will killed,how can i solve the exception plz help me

推荐答案

这意味着您的服务已经停止-从操作系统中终止,或者从您的应用程序中停止.

作为解决方案,您需要重写服务的onStop()方法,并观察导致它的事件流.如果您不通过此方法而捕获DeadObjectException,则您的服务应该已被操作系统杀死.
This means that your service had already stopped - either killed from the OS, or stopped from your application.

As the solution, you need to override your service''s onStop() method and watch what event flow leads to it. If you catch DeadObjectException without going through this method, your service should have been killed by the OS.


这篇关于请帮我,我得到了andriod.os.deadObjectException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆