This message appears when you are doing a long task on the main thread. It is called ANR (Application Not Responding). You should look at what's happening by using debug and profiling tools.
Add a break point into your code and Bedug (instead of Run) your app on the device. You can also profile the execution of your app through DDMS, to identify the part of the code that runs on the UI thread and take more than 5 second to process. You can find here more about Tracedump, the method profiling tool on Android.
Also, it could not come from your app but being caused by a third party element you call. I know for example the new "Photos" app from the Google apps can cause ANRs when you select a picture from the cloud that have not been downloaded yet.
If it is coming from a third part app, I don't know how you can solve this problem.