android.os.DeadObjectException,可能修复?

时间:2017-10-04 03:04:48

标签: java android

我正在尝试在ListView的{​​{1}}内显示整个下载目录。但是,应用程序有时会运行,其他时间会因日志而崩溃:

  

E / JavaBinder:!!!失败的粘合剂交易! (包裹大小= 420)   java.lang.RuntimeException:添加窗口失败                                                                             在android.view.ViewRootImpl.setView(ViewRootImpl.java:543)                                                                             在android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:310)                                                                             在android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)                                                                             在android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3169)                                                                             在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)                                                                             在android.app.ActivityThread.-wrap11(ActivityThread.java)                                                                             在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1344)                                                                             在android.os.Handler.dispatchMessage(Handler.java:102)                                                                             在android.os.Looper.loop(Looper.java:148)                                                                             在android.app.ActivityThread.main(ActivityThread.java:5417)                                                                             at java.lang.reflect.Method.invoke(Native Method)                                                                             在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                             在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)                                                                          引起:android.os.DeadObjectException:小包裹上的交易失败;远程过程可能已经死亡                                                                             在android.os.BinderProxy.transactNative(原生方法)                                                                             在android.os.BinderProxy.transact(Binder.java:503)                                                                             在android.view.IWindowSession $ Stub $ Proxy.addToDisplay(IWindowSession.java:746)                                                                             在android.view.ViewRootImpl.setView(ViewRootImpl.java:531)                                                                             在android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:310)                                                                             在android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)                                                                             在android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3169)                                                                             在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)                                                                             在android.app.ActivityThread.-wrap11(ActivityThread.java)                                                                             在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1344)                                                                             在android.os.Handler.dispatchMessage(Handler.java:102)                                                                             在android.os.Looper.loop(Looper.java:148)                                                                             在android.app.ActivityThread.main(ActivityThread.java:5417)                                                                             at java.lang.reflect.Method.invoke(Native Method)                                                                             在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                             在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

以下是同一活动的源代码:

Activity

可能导致此异常的原因是什么,以及解决此问题的有效方法是什么?

0 个答案:

没有答案