简体   繁体   中英

Android Studio doesn't show exception stack trace

This is driving me nuts. No exception is thrown when I debug my app it just stops out of the blue. The only workaround I have found so far is to put a huge try-catch block in order to see the exception that caused the crash, but this is really not a solution. I have already tried to kill and restart adb server and I don't use Google Analytics so I can't disable the exception tracker, as it's suggested in other questions here in stackoverfow. My log level is set to debug, and I don't have any filters in my stack. I think this has something to do with Android Studio but I can't figure it out.

If you are using a real device, probably the logging is disabled from the OS.

Open the dialer e type this code *#*#2846579#*#*.

Go to Background Settings > LOG Settings and check the logging option you need.

Reboot the phone.

A few things to check:

  • Are you working on Android Studio with Canary version?
  • Check your Android Studio is targeting your device on debug mode.
  • Try to invalidate the cache and restart to your studio Under File > Invalidate Caches/Restart (this has helped me).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM