android.app.RemoteServiceException: can‘t deliver broadcast

日常报错记录

android.app.RemoteServiceException: can't deliver broadcast 

W BroadcastQueue: Can't deliver broadcast to com.broadcast.test(pid 1769). Crashing it.
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.broadcast.test, PID: 1769
E AndroidRuntime:
android.app.RemoteServiceException: can't deliver broadcast
E AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:106)
E AndroidRuntime:     at android.os.Looper.loop(Looper.java:164)
E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:6494)
E AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

(上面是系统的日志,下面一句是我对crash的捕捉日志)

E CrashHandler: ex = android.app.RemoteServiceException: can't deliver broadcast

刚发送异常报错时很惊讶,因为 app已经正常运行了2个月。突然的报错还是很懵的。但是作为研发,报错肯定时代码运行导致,不论有多少个理由,不管是不是代码逻辑引起的。我们都必须找到原因,解除心里的疑惑。不多说,看日志,打断点,一步步跟踪。

最后发现是使用广播broadcast跨进程传输数据导致的。使用broadcast传输intent数据,由于该intent封装的数据来自后端网络,网络数据突然变大,超出了intent的传输大小限制,导致应用crash。

根据调试时保存数据到文件,测试设备传输200k左右的数据就卡死了。

解决方式:使用其他的方式传输大的数据。

1,使用全局变量缓存。broadcast只做通知,告诉被接收者更新数据。

2,SharedPreference存储。

3,文件存储。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ARM(ZYNQ) cortexa9 Cross compiled CAN utils: To run CAN, use the below command: 1. Set bit-timing Can supports bitrates upto 1Mb/s. Xilinx CAN h/w and driver supports these bit rates Note: Triple sampling is not supported by Xilinx CAN H/W. $ ./ip link set can0 type can bitrate 200000 or $ ./canconfig can0 bitrate 200000 2. Bring up the device $ ./ip link set can0 up or $ ./canconfig can0 start 3. Bring down the device $ ./ip link set can0 down or $ ./canconfig can0 stop 4. Transmit and receive packets with standard id number $ ./cansend can0 -i 0x14 $ ./candump can0 5. Transmit and receive packets with extended id number (--loop argument here) $ ./cansend can0 -i 0x333 $ ./candump can0 6. Loopback mode $ ./canconfig can0 ctrlmode loopback on 7. Checking link state (checking bitrate/errors/packets) $ ./ip -d -s link show can0 8. Checking net device state $ ifconfig can0 9. Getting statistics via proc $ cat /proc/net/can/stats 10. Socket CAN core uses several filter lists to deliver received CAN frames to CAN protocol modules. These receive lists, their filters and the count of filter matches can be checked in the appropriate receive list. All entries contain the device and a protocol module identifier: $ cat /proc/net/can/rcvlist_all rcvlist_all - list for unfiltered entries (no filter operations) rcvlist_eff - list for single extended frame (EFF) entries rcvlist_err - list for error message frames masks rcvlist_fil - list for mask/value filters rcvlist_inv - list for mask/value filters (inverse semantic) rcvlist_sff - list for single standard frame (SFF) entries
First Edition Build Android Apps That Are Stunningly Attractive, Functional, and Intuitive In today’s crowded Android marketplace, it’s more important than ever to differentiate your apps. Great design is the best way to do that. Now, leading Android app design expert Ian G. Clifton shows you how to make your apps come alive and how to deliver apps that users will want, love, and buy! Reflecting the Android 4.2 SDK, this book serves both as a tutorial for the entire design and implementation process and as a handy reference you’ll rely on for every Android development project. Clifton shows how to create effective designs, organize them into Android components, and move gracefully from idea, to wireframe, to comp, to finished app. You’ll learn how to bring your own voice, personality, and style to your app designs; how to leverage advanced drawing techniques such as PorterDuff compositing; how to test designs on diverse Android devices; and much more. Android User Interface Design details each step of the design and development process and contains extensive downloadable sample code, including complete finished apps. Learn how Android has evolved to support outstanding app design Integrate app design with development, from idea through deployment Understand views, the building blocks of Android user interfaces Make the most of wireframes and prototypes Build efficient layouts and integrate smooth animations Make apps more useful by automatically updating ListViews Combine views into custom components Use image compositing and other advanced techniques Work with the canvas and advanced drawing Leverage Google Play and Amazon Appstore assets One step at a time, this guide helps you bridge the gap between Android developers and designers so you can work with colleagues to create world-class app designs...or do it yourself!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值