https://blog.youkuaiyun.com/persistencegoing/article/details/84376427
All rights reserved.No part of this article may be reproduced or distributed by any means,or stored in a database or retrieval system,without the prior written permission of persistenceGoing author
错误一
Channel is unrecoverably broken and will be disposed,在log error 打印里没有明显的错误,然后找了很久发现这个报错,然后推断是内存溢出

错误二
Reason: Input dispatching timed out (Waiting because the touched window has not finished processing the input events that were previously delivered to it.)
Load: 0.9 / 0.57 / 0.68
CPU usage from 2505ms to -3307ms ago:
94% 20357/com.richeninfo.cmoa: 94% user+ 0.3% kernel / faults: 1 minor
22% 810/system_server: 17% user + 5.1% kernel / faults: 1061 minor
0.5% 146/debuggerd: 0.2% user + 0.3% kernel / faults: 2717 minor
3.4% 977/com.android.systemui: 3.2% user + 0.1% kernel / faults: 11 minor
1.8% 1310/com.android.phone: 1.5% user + 0.3% kernel
1.3% 9586/adbd: 0% user + 1.3% kernel / faults: 629 minor
1% 1345/com.miui.whetstone: 1% user + 0% kernel
0.1% 1329/com.xiaomi.finddevice: 0% user + 0% kernel
0.8% 11382/kworker/0:0: 0% user + 0.8% kernel
0.8% 22403/com.mi.liveassistant: 0.1% user + 0.6% kernel
0.5% 925/com.xiaomi.xmsf: 0.3% user + 0.1% kernel
0.1% 3/ksoftirqd/0: 0% user + 0.1% kernel
错误三
Long monitor contention with owner
解决方案:
方案一:
在安卓应用AndroidManifest.xml中添加largeHeap="true"
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:largeHeap="true"
方案二:
优化代码
本文针对Android应用开发中常见的三个错误进行了解析,并提供了具体的解决方案。错误包括Channel断裂、输入分发超时及长监视内容争用。通过调整AndroidManifest.xml设置和优化代码,可以有效避免这些问题。
5045

被折叠的 条评论
为什么被折叠?



