DeadSystemException 启动服务 Android 7 [英] DeadSystemException start service Android 7

查看:29
本文介绍了DeadSystemException 启动服务 Android 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的几周里,我的崩溃记者:

For the past few weeks, I have on my crash reporter:

Fatal Exception: java.lang.RuntimeException: Unable to start service com.####.MyService@ef705d8 with Intent { act=HIDE cmp=com.####/.MyService (has extras) }: java.lang.RuntimeException: android.os.DeadSystemException
       at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3344)
       at android.app.ActivityThread.-wrap21(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1583)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6121)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

此崩溃出现在:

  • 所有三星设备 7.0

  • all Samsung devices 7.0

7.1.2 上的所有 Nexus 设备

all Nexus devices on 7.1.2

注意:

  • 这不是因为我们最近更新了我们的应用程序,而是这些手机上的操作系统更新.

  • It is not due to a recent update of our application, just an OS updates on theses phones.

这是一个非常频繁的崩溃(迄今为止我们最大的一次).

It is a very very frequent crashes (by far our biggest).

我们的用户不会比以前报告崩溃(用户是否真的可以看到此崩溃?)

Our users don't report crashes than before (is this crash actually visible for the user?)

我们无法复制它

正如您在堆栈跟踪中看到的,受影响的代码仅限于系统.从我的角度来看,我无能为力来试图抓住和处理这个问题.

As you can see into the stack trace, the code impacted is system only. Not much I can do from my side to try and catch and handle the issue.

我检查了线程 Android DeadSystemException 但这对我没有多大帮助.

I checked the thread Android DeadSystemException but that doesn't help me much.

我知道 DeadSystemException 是:

核心 Android 系统已死机,正在重新启动运行时.所有正在运行的应用程序将被立即终止.

The core Android system has died and is going through a runtime restart. All running apps will be promptly killed.

除了说那是系统,我们无能为力"之外,我们能做些什么吗?

Is there anything we can do but to say "that's system, we cannot do anything"?

推荐答案

设备重启时,无法运行应用.任何应用程序,不仅是您的应用程序,而且任何给定的应用程序都无法在设备重新启动时运行.当您在系统崩溃时尝试做某事时,它就会发生.这意味着如果系统崩溃并且在重新启动您的应用程序时启动服务或执行某些操作,您会收到该错误.

When the device is being restarted, you cannot run an app. Any app, not just yours but any given app cannot run when the device is restarting. AFAIK it occurs when you try to do something when the system crashes. Meaning if the system crashes and as it restarts your app starts a service or does something you get that error.

表示异常未连接到您的应用,而是连接到 Android 操作系统,您对此无能为力.

Meaning the exception is not connected to your app, but the Android OS and there is nothing you can do about it.

与启动服务相关的崩溃是因为这是您的应用在系统崩溃时所做的.

The crash being related to starting a service is because that is what your app did when the system crashed.

所以:该错误是系统抛出的,因为您的应用在系统运行时重新启动时做了一些事情.对此您无能为力,因为您无法通过应用控制 Android 操作系统.

So: The error is something the system threw because your app did something when the system did a run-time reboot. There is nothing you can do about this, as you cannot control the Android OS from an app.

这篇关于DeadSystemException 启动服务 Android 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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