How to print stacktrace for an exception Android [duplicate]

} catch (IOException e) {
    Log.e("YOUR_APP_LOG_TAG", "I got an error", e);
}

And check the LogCat for the output.

Leave a Comment