0

I'm working in a application that I have a button to login, which checks if this account exists already in the database and if so, go to the next activity.

But nothing is showing in the layout screen.

The log cat is repeating the following message:

Skipped 48 frames! The application may be doing too much work on its main thread.

What is causing this?

Our Man in Bananas
  • 5,809
  • 21
  • 91
  • 148
douaa
  • 9
  • 1
  • 6
  • 1
    possible duplicate of [The application may be doing too much work on its main thread](http://stackoverflow.com/questions/14678593/the-application-may-be-doing-too-much-work-on-its-main-thread) – Alessandro Da Rugna May 16 '15 at 16:01

1 Answers1

0

I suggest you to take a look at http://developer.android.com/guide/components/processes-and-threads.html

Take some time studying how process and threads work on an Android system. It worth the effort.

Quoting a specific sentence related to your issue:

When your app performs intensive work in response to user interaction, this single thread model can yield poor performance unless you implement your application properly. Specifically, if everything is happening in the UI thread, performing long operations such as network access or database queries will block the whole UI. When the thread is blocked, no events can be dispatched, including drawing events. From the user's perspective, the application appears to hang. Even worse, if the UI thread is blocked for more than a few seconds (about 5 seconds currently) the user is presented with the infamous "application not responding" (ANR) dialog. The user might then decide to quit your application and uninstall it if they are unhappy.

Good luck !

Jonas Czech
  • 12,018
  • 6
  • 44
  • 65