10

我的 appwidget 崩溃并出现以下错误:

E/AndroidRuntime( 5572): FATAL EXCEPTION: main
E/AndroidRuntime( 5572): java.lang.RuntimeException: Unable to start receiver com.android.mlweatherwidget.WeatherWidgetLarge: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572):    at android.app.ActivityThread.handleReceiver(ActivityThread.java:1805)
E/AndroidRuntime( 5572):    at android.app.ActivityThread.access$2400(ActivityThread.java:117)
E/AndroidRuntime( 5572):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:981)
E/AndroidRuntime( 5572):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5572):    at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 5572):    at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 5572):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5572):    at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 5572):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 5572):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 5572):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 5572): Caused by: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572):    at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:375)
E/AndroidRuntime( 5572):    at com.android.mlweatherwidget.WeatherWidgetLarge.onReceive(WeatherWidgetLarge.java:202)
E/AndroidRuntime( 5572):    at android.app.ActivityThread.handleReceiver(ActivityThread.java:1794)
E/AndroidRuntime( 5572):    ... 10 more
E/AndroidRuntime( 5572): Caused by: android.os.DeadObjectException
E/AndroidRuntime( 5572):    at android.os.BinderProxy.transact(Native Method)
E/AndroidRuntime( 5572):    at com.android.mlhome.appwidget.ILauncherAppWidget$Stub$Proxy.getAppWidgetIds(ILauncherAppWidget.java:256)
E/AndroidRuntime( 5572):    at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:369)
E/AndroidRuntime( 5572):    ... 12 more

任何人都可以从上面的日志中了解究竟是什么导致了这个错误?

4

1 回答 1

0

How to fix android.os.DeadObjectException android X 这家伙遇到了同样的问题,查看这个链接。

我复制了 Dimitar Dimitrov 写的答案如下

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

每次调试项目时都会出现这个问题吗?

覆盖您的服务的 onDestroy() 方法并观察导致它的事件流。如果您在没有通过此方法的情况下捕获 DeadObjectException,则您的服务应该已被操作系统杀死。

于 2014-05-12T15:26:29.060 回答