You cannot print to the console on Android. You must use the Android Log class. When I have an exception and I want to print it, I use:
for (StackTraceElement element : exception.getStackTrace()) Log.e("my_tag", element.toString());
or you can try
String stackTrace = Log.getStackTraceString(throwable);
And after that you can print it in Android Log.
source share