当前位置:网站首页>Anr error encountered
Anr error encountered
2022-07-23 11:06:00 【Road of Kings 001】
Recently, I was solving a problem Android problem . The problems are as follows : When uploading on the mobile phone , Too many tasks , Report error , Even prompt “ No response , Whether to shut down ”.
obviously , This is the encounter with ANR error , That is to say Androdi The phone has no response error .
The reason for this error is :Android In order to respond quickly , Put related tasks related to graphic operation , Are put into the main thread ; But if the main thread is too busy to respond , Related errors will occur (When the UI thread of an Android app is blocked for too long, an "Application Not Responding" (ANR) error is triggered.).
resolvent : Put too much work into sub threads ; There are too many upload tasks in this network operation , It should be put into the sub thread .
The code is as follows :
new Thread(){
@Override
public void run(){
// The relevant operation
}
}.start();After testing , Sure enough , Problem solving .
边栏推荐
- Qt样式的语法定义获得途径,可查资料,可自动生成
- 村田muRata电源维修交换机服务器电源维修及主要功能特点
- 排序
- Two strategies for building AI products / businesses (by Andrew ng)
- “我最想要的六种编程语言!”
- 十年架构五年生活-01毕业之初
- Mysql的索引为什么用的是B+树?
- Epidemic period plus midlife crisis - three months wandering at the crossroads
- FFmpeg 音频编码
- Redis source code and design analysis -- 10. List object
猜你喜欢

Detailed explanation of structure

Single sign on - how to unify the expiration time of session between authentication server and client

Why does MySQL index use b+ tree?

C1 -- vivado configuration vs code text editor environment 2022-07-21

使用聚类分析 构建信用卡高风险客户识别模型

Redis源码与设计剖析 -- 5.整数集合

好玩的代码雨,在线分享给大家~-

部署storageclass踩坑记录

Cadence(九)17.4规则与间距设置

开发必备之Idea使用
随机推荐
结构体详解
Redis source code and design analysis -- 9. String object
Dynamic memory management
pygame实现飞机大战游戏
Cadence learning path (VIII) PCB placement components
C ivalueconverter interface usage example
防止神经网络过拟合的五种方法
使用pytorch实现基于VGG 19预训练模型的鲜花识别分类器,准确度达到97%
8、曲面几何
Matlab中的滤波器
超级简单的人脸识别api 只需几行代码就可以实现人脸识别
Activiti工作流使用之流程结构介绍
QT style syntax definition access, can check the data, can be automatically generated
Deploy metersphere
村田muRata电源维修交换机服务器电源维修及主要功能特点
好玩的代码雨,在线分享给大家~-
mysql语法(纯语法)
开发必备之Idea使用
赫克Hurco工控机维修WinMax数控机床控制器维修
Analyse du code source et de la conception de redis - - 7. Liste rapide