Viewing error information in Android Studio


I launch the application on my phone. If errors occur in the android monitor, information about them is not displayed. But if you run it on an emulator, then errors are displayed in the android monitor. Is it possible to somehow see the resulting exceptions if you run the application on a real device?


Use try / catch where errors are likely. In the catch Use the parent Exception, get the error text and print it to the log. try{//ваш код, который мождет содержать ошибки} catch (Exception ex){ Log.d("log_tag",ex.getMessage());}

Scroll to Top