Android studio打印log显示不全
2017-10-20 10:15
2679 查看
问题:
系统对log长度有限制,如果打印的log过长,比如接口响应结果过大,将会导致Logcat控台数据显示不全。解决办法:
我们可以分段打印:4000个字符打印一次。
if (response.length() > 4000) { for (int i = 0; i < response.length(); i += 4000) { if (i + 4000 < response.length()) Log.e("333", "response第一段log===" + response.substring(i, i + 4000)); else { Log.e("333", "response第二段log===" + response.substring(i, response.length())); } } } else { Log.e("333", "充值记录查询response===" + response); }
参考:
Android 终于知道Log显示不全的原因了相关文章推荐
- android 基础 log打印显示不全
- android studio 超长log打印,解决log打印不全问题
- android log打印显示不全的原因
- 关于Android studio Logcat显示不全,不显示自己需要打印的LOG数据
- 在Android Studio上魅族手机、华为手机无法打印Log
- Android Studio----- 无法打印---log----问题总结----华为坑深
- 【解决方案】Android中Log太多太长打印不全的问题
- 【Android Studio】日志打印 Log的使用
- Android 终于知道Log显示不全的原因了
- Android 长LOG打印不全解决办法一
- 打印Log和吐司显示的工具类
- Android Studio 的Logcat不会显示Log.i,log.e以及错误信息提示的问题
- 解决华为系列手机Log显示不全
- Android Studio----- 无法打印log----问题解决----华为坑深
- Android Studio----- 无法打印---log----问题总结----华为坑深(转)
- 关于IE打印预览内容显示不全的问题解决
- 工具类——Log日志打印,输出到文件,过滤显示日志位置
- ASP.NET GridView导出Excel 打印预览换行显示不全
- android studio 关闭log 打印
- Android 终于知道Log显示不全的原因了