关于 Android 的ANR in XXX.XXX.xxx ,Reason: Broadcast of Intent
来源:互联网 发布:淘宝客申请高佣金api 编辑:程序博客网 时间:2024/06/01 20:08
引起这个错误的原因是,在一个BroadcastReceiver中的onReceive方法中的处理不能超过10秒,如果超过就会出现ANR错误。
所有尽量不要在onReceive中做耗时的处理,最好用Service来处理。(不要另外开启线程,因为这个线程会随着onReceive的返回而终止。)
以下在Google API中的原文:
so you should
never perform long-running operations in it (there is a timeout of 10 seconds that the system allows
before considering the receiver to be blocked and
a candidate to be killed). You cannot launch a popup dialog in your
implementation of onReceive().
阅读全文
0 0
- 关于 Android 的ANR in XXX.XXX.xxx ,Reason: Broadcast of Intent
- 关于 Android 的ANR in XXX.XXX.xxx ,Reason: Broadcast of Intent
- [Android Lint] xxx is not translated in xxx 的解决方法
- [Android Lint] xxx is not translated in xxx 的解决方法
- [Android Lint] xxx is not translated in xxx 的解决方法
- [Android Lint] xxx is not translated in xxx 的解决方法
- [Android Lint] xxx is not translated in xxx 的解决方法
- [Android Lint] xxx is not translated in xxx 的解决方法
- [Android Lint] xxx is not translated in xxx 的解决方法
- 关于crosses initialization of “XXX的问题
- xxx
- xxx
- xxx
- XXX
- xxx
- xxx
- xxx
- xxx
- Spring创建Hibernate的SessionFactory的简易方法
- Android 6.0权限对应中文解释
- Android之INSTALL_FAILED_UPDATE_INCOMPATIBLE(pacakge:...do not match the previously installed version)
- 修改别人的jar里的少量代码来满足特定需求
- PagerSlidingTabStrip源码解析
- 关于 Android 的ANR in XXX.XXX.xxx ,Reason: Broadcast of Intent
- 【深入Spring】——Tiny Spring IoC(一)Bean
- auto 和shared_ptr
- Android平台架构详解2017-06-27
- iptables--知识总结3(NAT)
- 在Oracle存储过程中需要遍历一张表《转》
- 解析office工具类
- Hadoop基础教程-第8章 Zookeeper(8.1 Zookeeper介绍)(草稿)
- maven3实战之maven使用入门