编舞(639):跳过50帧跳过

2023-09-12 10:05:28 作者:合衬。

五月4号至12日:40:55.577:I /编舞(639):跳过50帧!该应用程序可能会做它的主线程的工作太多了。

04-12 05:40:55.577: I/Choreographer(639): Skipped 50 frames! The application may be doing too much work on its main thread.

每当我在Android模拟器上运行我的应用程序它显示占线(我的意思是旋转),它确实需要这么多时间,也有一些时候,它会永远忙

whenever I run my application on the android emulator it shows busy (I mean it rotates ) and it does take so much time and also some times it will be busy ever

好心能有人帮帮我吗?

和是否有任何版本的Andr​​oid模拟器,可以运行快速雷很慢?

and is there any version of android emulator which runs fast mine is very slow?

推荐答案

仿真器是在几乎所有情况下慢。当您使用真实的设备可能不再出现警告。无论如何,当您使用的UI线程太多,一个发生。可能的原因有:

Emulator is slow in almost every case. When you use a real device it may not appear the warning anymore. Anyway, that one happens when you use the UI thread too much. Possible causes are:

在UI线程加载数据库信息。 使用装载机 的 在UI线程上运行一个漫长的过程。 使用的AsyncTaskLoader 模拟器仅仅是缓慢的,因为你不超载的UI线程。 试试你的code真实设备上或遵循的准则here和这里 的 有很多事情要做的onCreate :设置活动与 configChanges Loading database information on the UI thread. Use a Loader Running long processes on the UI thread. Use an AsyncTaskLoader The emulator is just slow, as you don't overload the UI thread. Try your code on a real device or follow the guidelines here and here There is a lot to do onCreate: set the activity with configChanges