How to print stacktrace for an exception Android [duplicate] September 24, 2023 by Tarik } catch (IOException e) { Log.e("YOUR_APP_LOG_TAG", "I got an error", e); } And check the LogCat for the output.