6

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

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

kindly can some one help me?

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

anilgontla
  • 103
  • 1
  • 4
  • 12
  • Some code might be useful. – sandrstar Apr 12 '13 at 05:58
  • A little feedback would help, or if my answer conviced you, accept it. In fact, you should accept answers in your other questions, if they helped you in some way, or ask for modifications in existing answers to make them correct. Otherwise, people will not help you "that easily" – Sergi Juanola Apr 12 '13 at 08:43

1 Answers1

13

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:

  • 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
Community
  • 1
  • 1
Sergi Juanola
  • 6,531
  • 8
  • 56
  • 93
  • hi korcholis thanks for ur replay now what happeing is i am able to see the UI part in the back ground but in the foreground loading is going on i.e, rotating i waited for 1 hour even then it is loading – anilgontla Apr 12 '13 at 09:48
  • Could you try it on a real device? Plus, what are you loading on the foreground? You should load data on the background and painting the UI on the foreground. Could you update your question with some of the code you're using? – Sergi Juanola Apr 12 '13 at 14:13
  • hi i mean to say that i have am UI login screen when i load my application it loads the UI and i am able to see that UI but even after loading UI it will be busy rotating so that i am not able to give data in the UI part.if there is any way of sending the screenshot i will send. – anilgontla Apr 15 '13 at 05:55
  • You can upload pictures by editing your question and clicking the [Image] button – Sergi Juanola Apr 15 '13 at 06:07
  • i am not able to see the image button – anilgontla Apr 15 '13 at 06:10
  • You had to have at least 10 of reputation and I voted you up. You may want to refresh the page and try to edit your question again. If you don't see the button, try clicking Ctrl+G (or Cmd+G if you're on a Mac). If it doesn't work, upload the picture to http://imageshack.us/ and edit your question with your link – Sergi Juanola Apr 15 '13 at 06:13
  • Well, that Loading dialog doesn't magically appear. If your app shows that on your emulator (_I encourage you to use a real device. Emulators are not really fast at all_) on rotating or so, I'd try to look what's being loaded during the `onCreate` and `onResume` and to minimize that. You can also check my new option you can follow. It involves "not reloading everything on rotation" – Sergi Juanola Apr 15 '13 at 06:55
  • thank u for ur valuable suggesion it is working on real device – anilgontla Apr 15 '13 at 08:07
  • Oddly enough I am having a problem with real devices only at the moment. On the emulator (using genymotion) everything runs just fine and on every real device I have problems with animations. – Vic Torious Oct 05 '16 at 09:02