android:无法播放广播,我的应用被杀死了 在我的应用中,音乐一直在播放,视频和其他与图片相关的操作正在进行中。 在大多数情况下,我的应用通常会运行2个小时。但是有时(5/100次)它在运行约1.5小时时被android系统杀死。 此应用与AndroidManifest.xml中的“ android.uid.system”共享用户ID,并且位于手机的目录:system / app /中。因此,这是一个平台应用程序。 崩溃日志如下所示,我的应用程序的pid为8047。 我该如何解决这个BUG?
09-27 22:21:58.240 1283 1418 W BroadcastQueue: Can't deliver broadcast to com.my.app (pid 8047). Crashing it.
09-27 22:21:58.242 1278 1402 I ActivityManager: Killing 8047:com.my.demo/1000 (adj 0): scheduleCrash for 'can't deliver broadcast' failed
09-27 22:21:58.259 1283 1418 W BroadcastQueue: Failure sending broadcast Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 (has extras) }
09-27 22:21:58.259 1283 1418 W BroadcastQueue: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at android.os.BinderProxy.transactNative(Native Method)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at android.os.BinderProxy.transact(Binder.java:764)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at android.app.IApplicationThread$Stub$Proxy.scheduleRegisteredReceiver(IApplicationThread.java:1560)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at com.android.server.am.BroadcastQueue.performReceiveLocked(BroadcastQueue.java:491)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at com.android.server.am.BroadcastQueue.deliverToRegisteredReceiverLocked(BroadcastQueue.java:703)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java:858)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at com.android.server.am.BroadcastQueue$BroadcastHandler.handleMessage(BroadcastQueue.java:171)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at android.os.Handler.dispatchMessage(Handler.java:106)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at android.os.Looper.loop(Looper.java:164)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at android.os.HandlerThread.run(HandlerThread.java:65)
09-27 22:21:58.259 1283 1418 W BroadcastQueue: at com.android.server.ServiceThread.run(ServiceThread.java:46)
09-27 22:21:58.328 1283 7817 I WindowManager: WIN DEATH: Window{5fdb8d6 u0 com.my.demo/com.my.demo.MyTestMain}
09-27 22:21:58.329 1283 2949 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
09-27 22:21:58.334 1283 2960 I WindowManager: WIN DEATH: Window{202cf6 u0 com.my.demo/com.my.demo.DemoTestTestingActivity}
09-27 22:21:58.336 1283 1732 W ActivityManager: Scheduling restart of crashed service com.my.demo/.DemoTestService in 1000ms
09-27 22:21:58.337 1283 1732 W ActivityManager: Force removing ActivityRecord{73be0d2 u0 com.my.demo/.DemoTestTestingActivity t18}: app died, no saved state
09-27 22:21:58.401 1283 1732 W ActivityManager: Slow operation: 52ms so far, now at startProcess: returned from zygote!
09-27 22:21:58.401 1283 1732 W ActivityManager: Slow operation: 52ms so far, now at startProcess: done updating battery stats
09-27 22:21:58.401 1283 1732 W ActivityManager: Slow operation: 52ms so far, now at startProcess: building log message
09-27 22:21:58.401 1283 1732 I ActivityManager: Start proc 19855:com.my.demo/1000 for activity com.my.demo/.DemoTestMain
09-27 22:21:58.402 1283 1732 W ActivityManager: Slow operation: 53ms so far, now at startProcess: starting to update pids map
09-27 22:21:58.402 1283 1732 W ActivityManager: Slow operation: 53ms so far, now at startProcess: done updating pids map