android – 为什么LogCat没有显示完整的消息?

任何人都知道为什么Logcat没有显示完整的消息?
我尝试从我的网站打印xml响应,但我只能得到一些..

解决方法:

因为您的logcat已达到其最大大小,请参阅What is the size limit for Logcat and how to change its capacity?
尝试使用此代码将结果写入sdcard中的文本文件,然后使用DDMS获取它.

 public static void appendLog(String text)
{
    File logFile = new File("sdcard/log.txt");
    if (!logFile.exists())
    {
        try
        {
            logFile.createNewFile();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }
    try
    {
        // BufferedWriter for performance, true to set append to file flag
        BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true));
        buf.append(text);
        buf.newLine();
        buf.close();
    } catch (IOException e)
    {
        e.printStackTrace();
    }
}
上一篇:android – 不幸的是,(app)已停止 – 在新的/默认应用程序上的AVD / Eclipse中出现错误消息


下一篇:android – 如何在LogCat中插入一个日志,当我点击它时跳转到它的代码行?