Click here to Skip to main content
15,886,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have developed one android app.It works well.But sometimes it hang with "Unfortunatelly app has stopped working" message.How should I remove this error completely.Looper can be the way,To avoid it??
Posted
Comments
Richard MacCutchan 20-Jan-15 6:19am    
You need to run the application through the debugger to catch all the log messages associated with the error. You may also need to add some debug messages of your own.
Sarita S 20-Jan-15 6:27am    
Yeah.I added the debuge message at each stage.My app notifies for the Usb device connection and disconnection.when Device is connected My app shows the message "Device Connected" if I discoonnected It shows message "Device Disconnected".When I attach the device,It toast device connected , within this message disappear if I remove the device it will get hang.
Richard MacCutchan 20-Jan-15 6:31am    
Well you really cannot expect anyone else to guess what is happening. Debugging is the only way to diagnose issues such as this.
Sarita S 20-Jan-15 6:42am    
Sorry If I ask the silly question,but actually I am the beginner of Programming Languages..My question is,If app is getting hang while printing the debug message.Then How can we debug this??
Richard MacCutchan 20-Jan-15 6:46am    
I am afraid it is a matter of repeatedly trying things until you can find the place where the hang is occurring. Look at all your debug messages and the last one displayed will indicate the last successful point in the program. So you have to check the code from that point to see if you can figure out what is going wrong.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900