Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unfortunately, MyApp has stopped - no error logs in logcat

Every once in a while I get:

Unfortunately, MyApp has stopped.

Problem is easy to solve if you have some logs, but in my case logcat has absolutely no message of error (it has normal messages published by my app and other exceptions are shown there but not this one which causes this app has stopped).

Is there any chance I can solve this problem?

The good thing is I can quite easily reproduce it, thus I'm trying to put as many information I can to logcat and then investigate what happened.

I have ACRA up and running (other exceptions are caught by it but not this app has stopped).

When it happens my app is not visible and there are some things happendnig in IntentService. My app is tracking geofences and the app has stopped happens only on HTC M8 when I switch on and off Location in phone Settings. I've tested on different phones and it does not happen on LG G3, Nexus 5, Moto G, LG Swift L9.

like image 648
Marian Paździoch Avatar asked Sep 08 '15 10:09

Marian Paździoch


People also ask

Why apps are stopped unfortunately?

To clear cache, go to Settings > Application > Manage apps > Select "All" tabs, select the app which was producing error and then tap Clear cache and data. Clearing RAM is a good deal when you are facing the error "Unfortunately, the app has stopped" in Android.

What is the Logcat in Android?

Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class. This page is about the command-line logcat tool, but you can also view log messages from the Logcat window in Android Studio.


2 Answers

  • Did you try to run LogCat in command-line? You might be able to see the error. Android LogCat in command-line
  • If your using Eclipse as IDE, try checking your filters for LogCat. You may accidently not displaying errors in LogCat.
  • Try finding the error via the Debugger. Place breakpoints to places where you suggest the error to be.
like image 107
user3485077 Avatar answered Oct 21 '22 14:10

user3485077


In my case logcat was filtered. You can change filter in Android Monitor -> logcat -> Bottom right corner, change filter to No Filters. It will show all errors.

enter image description here

like image 3
Kamran Qadir Avatar answered Oct 21 '22 14:10

Kamran Qadir