Skip to content

Commit 7be7c68

Browse files
committed
ANR
1 parent c08da16 commit 7be7c68

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Android/ANR.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## ANR
2+
3+
> Application Not Responding
4+
5+
- 按键、触摸事件 **5S** 无响应
6+
- 广播 **10S** 未处理完成
7+
- 服务在 **10S** 未处理完成
8+
9+
### [BlockCanary工具检测](https://github.com/markzhai/AndroidPerformanceMonitor)
10+
11+
核心原理通过对主线程的Looper设置日志输入器,由于在Looper的loop方法会在每次调度Message时调用,通过判断是系统时间和当前线程的时间差值是否大于阈值,判断是否发生了ANR

0 commit comments

Comments
 (0)