ANR keyDispatchingTimedOut error

ANR Error

Activity Not Responding.

Your activity took to long to say to the Android OS 'hey i'm still alive'! (This is what the UI thread does).

http://developer.android.com/guide/practices/design/responsiveness.html

Basically if you make the UI thread do some complex task it's too busy doing your task to tell the OS that it is still 'alive'.

http://android-developers.blogspot.co.uk/2009/05/painless-threading.html

You should move your XML Parsing code to another thread, then use a callback to tell the UI thread you have finished and to do something with the result.

http://developer.android.com/resources/articles/timed-ui-updates.html


If Logcat doesn't output anything usefull, try to pull traces.txt from /data/anr/traces.txt

adb pull /data/anr/traces.txt .

as it may give more information on where the ANR Exception occurrred


Don't run blocking operations on the UI thread. Launch your own thread or use the AsyncTask class for a more convenient way to solve this.