gpt4 book ai didi

android - ANR keyDispatchingTimedOut

转载 作者:太空宇宙 更新时间:2023-11-03 11:17:25 26 4
gpt4 key购买 nike

当我开始我的 Activity 时,我收到一个 ANR 错误。我不知道如何修复,我认为这个错误是由事件引起的。

这是错误:

    01-23 12:29:29.594: E/ActivityManager(147): ANR in com.vxoom.qit.login (com.vxoom.qit.login/.UpdateTokenList)
01-23 12:29:29.594: E/ActivityManager(147): Reason: keyDispatchingTimedOut
01-23 12:29:29.594: E/ActivityManager(147): Load: 2.36 / 2.14 / 2.09
01-23 12:29:29.594: E/ActivityManager(147): CPU usage from 24818ms to 0ms ago with 99% awake:
01-23 12:29:29.594: E/ActivityManager(147): 3.3% 3575/com.vxoom.qit.login: 2.9% user + 0.3% kernel / faults: 939 minor
01-23 12:29:29.594: E/ActivityManager(147): 2% 3/ksoftirqd/0: 0% user + 2% kernel
01-23 12:29:29.594: E/ActivityManager(147): 0.6% 477/RTKTHREAD: 0% user + 0.6% kernel
01-23 12:29:29.594: E/ActivityManager(147): 0.3% 214/com.android.systemui: 0.2% user + 0% kernel / faults: 10 minor
01-23 12:29:29.594: E/ActivityManager(147): 0.2% 147/system_server: 0.2% user + 0% kernel / faults: 23 minor
01-23 12:29:29.594: E/ActivityManager(147): 0.1% 85/surfaceflinger: 0% user + 0% kernel
01-23 12:29:29.594: E/ActivityManager(147): 0% 133/adbd: 0% user + 0% kernel
01-23 12:29:29.594: E/ActivityManager(147): 0% 2611/kworker/u:0: 0% user + 0% kernel
01-23 12:29:29.594: E/ActivityManager(147): 0% 3450/kworker/u:1: 0% user + 0% kernel
01-23 12:29:29.594: E/ActivityManager(147): 7.4% TOTAL: 3.5% user + 3.5% kernel + 0.2% softirq
01-23 12:29:29.594: E/ActivityManager(147): CPU usage from 354ms to 868ms later:
01-23 12:29:29.594: E/ActivityManager(147): 2.7% 477/RTKTHREAD: 0% user + 2.7% kernel
01-23 12:29:29.594: E/ActivityManager(147): 1.2% 3/ksoftirqd/0: 0% user + 1.2% kernel
01-23 12:29:29.594: E/ActivityManager(147): 1.9% 147/system_server: 0% user + 1.9% kernel
01-23 12:29:29.594: E/ActivityManager(147): 1.9% 179/InputDispatcher: 0% user + 1.9% kernel
01-23 12:29:29.594: E/ActivityManager(147): 7.6% TOTAL: 0% user + 7.6% kernel

最佳答案

不,这很可能是你的错。因为某些东西正在 UI 线程中工作,所以无法分派(dispatch)触摸事件。这就是抛出异常的原因。

在手机设置中打开开发者选项并启用严格模式(名称可能不同),这将帮助您在主线程中找到长时间运行的操作。

什么触发了 ANR:
http://developer.android.com/training/articles/perf-anr.html

关于android - ANR keyDispatchingTimedOut,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14474238/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com