Android 打印堆栈信息的方法:
1:
RuntimeException re = new RuntimeException(); re.fillInStackTrace(); Log.e("info", "info", re);
2:
- Log.w(TAG, Log.getStackTraceString(new Throwable()));
3:
- try {
- } catch (InterruptedException e) {
- Log.e(TAG, Log.getStackTraceString(e));
- }