關於Android studio Logcat顯示不全,不顯示自己需要打印的LOG數據


logcat顯示不全可以參考以下代碼,簡單有效

 1 if (responseInfo.result.length() > 4000) {
 2                     Log.v(TAG, "sb.length = " + responseInfo.result.length());
 3                     int chunkCount = responseInfo.result.length() / 4000;     // integer division
 4                     for (int i = 0; i <= chunkCount; i++) {
 5                         int max = 4000 * (i + 1);
 6                         if (max >= responseInfo.result.length()) {
 7                             Log.v(TAG, "chunk " + i + " of " + chunkCount + ":" + responseInfo.result.substring(4000 * i));
 8                         } else {
 9                             Log.v(TAG, "chunk " + i + " of " + chunkCount + ":" + responseInfo.result.substring(4000 * i, max));
10                         }
11                     }
12                 } else {
13                     Log.v(TAG, responseInfo.result.toString());
14                 }

如果你的項目中包含了libra項目,你需要手動選擇到no filters,就能看到當前運行的工程的所有log信息了,如圖:

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM