在进行程序调试的时候,有时不知道是什么地方error了,除了打log、断电调试的方法还可以 打出一个堆栈信息 :new Exception("TAG").printStackTrace(); 相当于强制打出了一个异常。