解决Android日志输出过长的问题

来源:互联网 发布:网络推广的综合方案 编辑:程序博客网 时间:2024/03/29 05:00

有时候Logcat日志过长,为了方便查看,我们可以把它存储到text文档。 

String str = "hello world";try {FileWriter fw = new FileWriter(PATH + "/aa.txt");fw.flush();fw.write(str);fw.close();} catch (Exception e) {e.printStackTrace();} 


 

原创粉丝点击