`
yangwei0915
  • 浏览: 461529 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

减少android程序的is not responding

阅读更多

1.尽量在主线程中少做事情,尤其是一些耗时较长的操作。主线程只负责构造界面,响应用户的事件。耗时较长的操作可以

   采用线程或AsyncTask,并且尽量采用AsyncTask。并且一些button或player等组件的监听器也是执行的主线程,也

   不能有太多的操作。

2.主线程和监听器的方法中不能有Thread.sleep()。否则也会阻塞主线程。

分享到:
评论
1 楼 adamli007 2010-05-19  
我现在用广播将图片设为壁纸,设完之后进行recycle()方法,这样经常出现is not responding ,请问有什么解决方法?

相关推荐

    adb not responding

    android开发时常会碰到adb not responding,导致无法调试运行应用程序,通过DDMS的Reset adb后依旧无法解决,那么可以尝试使用此bat文件: 1、下载后点击运行,显示端口使用列表 2、找到状态为LISTENING的一行,复制...

    Android ANR(Application Not Responding)的分析

     ANR定义:在Android上,如果你的应用程序有一段时间响应不够灵敏,系统会向用户显示一个对话框,这个对话框称作应用程序无响应(ANR:Application Not Responding)对话框。用户可以选择“等待”而让程序继续运行...

    Android开发中避免应用无响应的方法(Application Not Responding、ANR)

    主要介绍了Android开发中避免应用无响应的方法,即避免弹出Application Not Responding(ANR)对话框,需要的朋友可以参考下

    Application-Not-Responding(ANR)-Analyze.pdf

    MTK 内部资料介绍ANR 相关 Outline ▪ What is ANR; ▪ ANR key info; ▪ Analyze ANR; ▪ Example; ▪ Need MTK help; ▪ Monkey ANR

    Android性能优化技术在某体重管理APP中的应用研究.pdf

    ANR(Application Not Responding)和 OOM(Out Of Memory)是 Android 应用程序中两个常见的问题。ANR 是指应用程序在 10 秒内没有响应用户事件,OOM 是指应用程序内存溢出错误。ANR 的原因是 BroadcastReceiver 10...

    moxa-mxview-plugin-for-mgate-series-software-package-v2.5.zip

    Blinking: Indicates an IP conflict, or the DHCP or BOOTP server is not responding properly Flashing quickly: the microSD card failed LAN Green (Flashing only) The Ethernet port is receiving or ...

    Android实现ListView异步加载图片

    如果不使用异步加载图片,可能会导致应用程序卡顿、崩溃或出现 ANR(Application Not Responding)错误。异步加载图片可以避免这些问题,提高应用程序的性能和用户体验。 2. SoftReference 的作用 在上面的代码中...

    V850 Complier v3.44

    Rensas(NEC) V850 family 芯片官方编译器,直接解压既可以使用

    Renesas_Flash_Programmer

    RenesasE1烧录器驱动程序

    通过Android trace文件分析死锁ANR实例过程

    遇到ANR(Application Not Responding)是比较常见的问题,产生ANR的原因有很多,比如CPU使用过高、事件没有得到及时的响应、死锁等,下面将通过一次因为死锁导致的ANR问题,来说明如何通过trace文件分析ANR问题

    xds100_drivers/CCS高版本适用/仿真器驱动

    在csdn就找不到一个可以用的,最后通过仿真器商家拿到了,里面有安装程序。

    android_loader_demo

    在Android3.0之前很多的应用都会遇到UI主线程阻塞的问题,也就是常说的ANR(Application Not Responding),其中占据最大就是数据加载这块。其实至今每个android程序员都意识到这个问题的存在,都会想各种方法去避开...

    Pro Android 4

    This book is for professional software engineers and programmers looking to move their ideas and applications into the mobile space with Android. It assumes a passable understanding of Java, including...

    Android-教程精华-摘要-开发-面试-免费

    在Android上,如果你的应用程序有一段时间响应不够灵敏,系统会向用户 显示一个对话框,这个对话框称作应用程序无响应(ANR:Application Not Responding)对话框。用户可以选择让程序继续运行,但是,他们在使用你...

    Development.apk(Android Dev Tools)

    2.6 ANR(Application Not Responding)(Stop responding for 20 seconds)——(应用无响应)(停止反应20s) 2.7 ANR starting an Activity(运行一个活动,但是应用无相应) 2.8 ANR recriving a broadcast Intent...

    CommonsWare.The.Busy.Coders.Guide.to.Android.Development.Version.8.2.2017

    Android, the next-generation open mobile platform from Google and the Open Handset Alliance, is poised to become a significant player in the mobile device market. The Android platform gives developers...

    Pro.Android.5.1430246804

    This book is for professional software engineers and programmers looking to move their ideas and applications into the mobile space with Android. It assumes a passable understanding of Java, including...

    Pro.Android.5.14302468

    This book is for professional software engineers and programmers looking to move their ideas and applications into the mobile space with Android. It assumes a passable understanding of Java, including...

Global site tag (gtag.js) - Google Analytics