Android下打印堆栈的两种方法
1.
for(StackTraceElement i:Thread.currentThread().getStackTrace()){
System.out.println(i);
}
2.
Log.i("bill",Log.getSackTraceString(new Throwable());
1.
for(StackTraceElement i:Thread.currentThread().getStackTrace()){
System.out.println(i);
}
2.
Log.i("bill",Log.getSackTraceString(new Throwable());