debug时报anr错:Reason: Input dispatching timed out 解决办法

在排查问题对点击事件的监听debug时,突然遇到这种anr报错 大体意思是点击事件超过5s没有回应 系统报出anr错误并闪退,导致我无法debug查看问题。

ANR in com.*******
PID: 29203
Reason: Input dispatching timed out (c624814 com.******* (server) is
not responding. Waited 5005ms for MotionEvent(deviceId=5,
eventTime=73289263504000, source=TOUCHSCREEN, displayId=0,
action=DOWN, actionButton=0x00000000, flags=0x00000000,
metaState=0x00000000, buttonState=0x00000000, classification=NONE,
edgeFlags=0x00000000, xPrecision=1.3, yPrecision=1.3,
xCursorPosition=nan, yCursorPosition=nan, pointers=[0: (357.5,
1657.7)]), policyFlags=0x62000000)
ErrorId: 6ebb2bee-fae2-40d3-81d8-a6ee5f991881
Frozen: false
Load: 0.0 / 0.0 / 0.0
----- Output from /proc/pressure/memory -----
some avg10=0.00 avg60=0.00 avg300=0.00 total=23616775
full avg10=0.00 avg60=0.00 avg300=0.00 total=8466029
----- End output from /proc/pressure/memory -----

                                                                                                CPU usage from 23902ms to 0ms ago (2022-12-02 18:03:29.126 to

2022-12-02 18:03:53.029) with 99% awake:
16% 29203/com.meizu.net.search: 11% user + 5.3% kernel / faults: 14319
minor
10%
29455/com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0:
8.2% user + 1.8% kernel / faults: 6409 minor
6.6% 24092/adbd: 1.1% user + 5.4% kernel / faults: 2246 minor

android Studio 输入下方命令行即可不闪退 正常debug操作

adb shell settings put secure anr_show_background 1

你可能感兴趣的:(android,android)