in.app.balaji 中的 ANR 编号:9948 原因:应用程序请求:MainThread 超时 错误ID:8e317451-e531-43d9-b310-42b887bfd4c2 冻结:假 负载:0.0/0.0/0.0 ----- /proc/Pressure/Memory 的输出 ----- 一些 avg10=3.88 avg60=1.98 avg300=1.26 总计=3095676089 完整 avg10=1.37 avg60=0.64 avg300=0.38 总计=996839902 ----- /proc/Pressure/Memory 的结束输出 ----- ----- /proc/压强/cpu 的输出 ----- 一些 avg10=12.41 avg60=6.46 avg300=4.55 总计=20593166863 ----- /proc/Pressure/cpu 的结束输出 ----- ----- /proc/Pressure/io 的输出 ----- 一些 avg10=3.20 avg60=1.35 avg300=0.78 总计=3793799535 完整 avg10=1.29 avg60=0.43 avg300=0.24 总计=1815292022 ----- /proc/Pressure/io 的结束输出 -----
CPU usage from 175018ms to -1ms ago (2024-01-25 15:46:00.073 to 2024-01-25 15:48:55.093):
16% 1969/system_server: 8.7% user + 7.5% kernel / faults: 69086 minor 114 major
13% 1562/surfaceflinger: 9% user + 4.7% kernel / faults: 3715 minor 65 major
5.5% 879/adbd: 1% user + 4.4% kernel / faults: 10979 minor 2 major
4.4% 6113/com.google.android.providers.media.module: 1.7% user + 2.7% kernel / faults: 8613 minor 126 major
4% 4221/com.android.systemui: 2.7% user + 1.3% kernel / faults: 35944 minor 210 major
3.6% 1405/vendor.qti.hardware.display.composer-service: 1.8% user + 1.7% kernel / faults: 325 minor
3.5% 9952/hybridswapd:0: 0% user + 3.5% kernel
3.5% 183/kswapd0:0: 0% user + 3.5% kernel
2.6% 649/logd: 0.4% user + 2.1% kernel / faults: 3407 minor 34 major
2.6% 9513/kworker/u24:0-devfreq_wq: 0% user + 2.6% kernel / faults: 180 minor
21% TOTAL: 9.5% user + 9.8% kernel + 0.2% iowait + 1.7% irq + 0.4% softirq
CPU usage from 189ms to 1606ms later (2024-01-25 15:48:55.280 to 2024-01-25 15:48:56.698) with 99% awake:
169% 1969/system_server: 67% user + 101% kernel / faults: 7529 minor 341 major
71% 12305/AnrAuxiliaryTas: 21% user + 50% kernel
56% 2064/Signal Catcher: 34% user + 22% kernel
7% 7096/binder:1969_1F: 2.6% user + 4.4% kernel
5.3% 2067/HeapTaskDaemon: 4.4% user + 0.8% kernel
4.4% 7101/binder:1969_20: 2.6% user + 1.7% kernel
1.7% 7094/binder:1969_1D: 0.8% user + 0.8% kernel
1.7% 12303/AnrConsumer: 0% user + 1.7% kernel
0.8% 2074/binder:1969_2: 0.8% user + 0% kernel
0.8% 2842/Thread-5: 0% user + 0.8% kernel
0.8% 3211/binder:1969_4: 0% user + 0.8% kernel
0.8% 3408/android.imms: 0% user + 0.8% kernel
0.8% 3989/LockSettingsSer: 0.8% user + 0% kernel
0.8% 3993/tworkPolicy.uid: 0.8% user + 0% kernel
0.8% 3994/WifiHandlerThre: 0% user + 0.8% kernel
0.8% 4009/ranker: 0.8% user + 0% kernel
0.8% 4011/NotificationSer: 0% user + 0.8% kernel
0.8% 4052/SliceManagerSer: 0% user + 0.8% kernel
0.8% 4058/ackgroundThread: 0.8% user + 0% kernel
0.8% 4084/init_criticallo: 0% user + 0.8% kernel
0.8% 4089/OplusWifiCPUThr: 0.8% user + 0% kernel
0.8% 4114/OplusNetworkSta: 0.8% user + 0% kernel
0.8% 4205/athena_killer: 0% user + 0.8% kernel
0.8% 4224/oSenseResHandle: 0% user + 0.8% kernel
0.8% 4274/memFeatureT: 0.8% user + 0% kernel
0.8% 4621/HansStateMachin: 0.8% user + 0% kernel
0.8% 4636/CpuLimitManager: 0% user + 0.8% kernel
0.8% 6546/OwmIcmpMonitor: 0% user + 0.8% kernel
77% 183/kswapd0:0: 0% user + 77% kernel
113% 6113/com.google.android.providers.media.module: 38% user + 75% kernel / faults: 449 minor 31 major
13% 13445/Thread-8: 6.8% user + 6.8% kernel
12% 18569/Thread-13: 5.4% user + 6.8% kernel
10% 6667/Thread-3: 2.7% user + 8.2% kernel
10% 7042/Thread-12: 5.4% user + 5.4% kernel
10% 20490/Thread-19: 2.7% user + 8.2% kernel
10% 32141/Thread-9: 2.7% user + 8.2% kernel
9.5% 4497/Thread-20: 4.1% user + 5.4% kernel
9.5% 6670/Thread-4: 1.3% user + 8.2% kernel
9.5% 9183/Thread-5: 4.1% user + 5.4% kernel
9.5% 13140/Thread-7: 2.7% user + 6.8% kernel
8.2% 20771/binder:6113_10: 1.3% user + 6.8% kernel
102% 9948/in.games.balajimarket: 95% user + 6.3% kernel / faults: 1953 minor
我一次将 100 个数据加载到回收器视图中,然后应用程序因上述错误而崩溃。如果有人知道解决方案,请提供给我。
谢谢。
您的主线程被阻塞的时间太长,这就是它抛出 ANR 的原因,请考虑在后台线程上执行操作或使用 Coroutines 或 RxJava 等异步机制来加载数据。