catch (Exception e) { Log.e(TAG,Log.getStackTraceString(e)); } 参考:https://stackoverflow.com/questions/3855187/is-it-a-bad-idea-to-use-printstacktrace-in-android-exceptions