默认LOG打开出来的内容是单行的,比如JSON,都变成一行显示了
希望可以正常输出字符串,支持换行
android log multiple lines
logging – Displaying a log per line for a multiline text – Stack Overflow
android – How can I see long texts/msg in logcat? – Stack Overflow
what kind of control should I use to display multiline output (Android UI Basics) – Stack Overflow
linux – How to log multiline message with logger command? – Server Fault
android logcat multiple lines
android – Displaying More string on Logcat – Stack Overflow
logging – Android – Set max length of logcat messages – Stack Overflow
android – How to copy logcat output to clipboard? – Stack Overflow
【总结】
Android中调试打印的话,想要支持换行,要自己写函数:
public static void longInfo(String str) { if(str.length() > 4000) { Log.i(TAG, str.substring(0, 4000)); longInfo(str.substring(4000)); } else Log.i(TAG, str); } |
麻烦。
转载请注明:在路上 » 【已解决】android调试打印支持换行