LogCat在Eclipse中停止运行需要重新启动
即使我处于调试模式,LogCat 也会定期停止显示消息。其他时候它一次只显示一行!我有一个解决办法,重启eclipse。但我想更好地理解这一点。发生这种情况时,重新启动 eclipse 需要花费太多时间。我在模拟器上看到了这种行为并连接到了设备。 LogCat 要么显示一行没有历史记录,要么什么也不显示。
Periodically LogCat will stop showing messages even though I am in debug mode. At other times it will display only one line at a time! I have a solution, restart eclipse. But I would like to understand this better. It takes too much time to restart eclipse when this happens. I have seen this behavior on the emulator and connected to a device. Either the LogCat shows one line with no history or nothing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
我遇到了同样的问题,这里的解决方案对我不起作用。我找到的解决方案是打开 DDMS 透视图并在“设备”窗口中选择设备和正在运行的进程。完成后,LogCat 恢复活力。
I was with the same problem and the solutions here didn't work for me. The solution I found is open the DDMS perspective and select the device and the running process on the Devices window. With that done, the LogCat returns to life.
是的,我可以通过清除日志来恢复正常的logcat。另外,我在“运行/调试”->“控制台”中取消选中“限制控制台输出”。
Yes, I can get the normal logcat back by clear the log. Also I uncheck the "Limit console output" in Run/Debug->Console.
我通过两种不同的方式解决这些 LogCat 问题:
Window
->Show View
->其他
->Android
->设备
),然后单击我要查看日志的设备。这似乎迫使 Android 在该设备上刷新 LogCat。这些是比重新启动 eclipse 或搞乱 adb 更容易的选项。
I solve these LogCat issues in two different ways:
Window
->Show View
->Other
->Android
->Devices
), and clicking on the device that I want to view the log for. This seems to force Android to refresh LogCat on that device.These are much easier options than restarting eclipse, or messing with adb.
我多次遇到过“一次一行”的问题。我不知道为什么会发生这种情况,但有一个非常简单的修复方法每次都适合我。只需点击清除日志按钮即可。简单又容易。
我也遇到过 Logcat 无法显示消息的情况。一般来说,这是由于模拟器出现问题,需要重新启动模拟器。
I've had that "one line at a time" problem numerous times. I don't know why exactly it happens but there is a very simple fix that works for me every time. Just hit the clear log button. Simple and easy.
I've also had Logcat fail to show messages. Generally this has been due to a problem with the emulator and it required an emulator restart.
在eclipse中,你需要给日志缓冲区更多的空间,默认是5000,我将其设置为50000,没有任何问题。
窗口->首选项->android>logcat
缓冲区日志消息的最大数量 __ 设置一些数字 50k 就可以
In eclipse you need to give more space to log buffer, default is 5000, i set it to 50000 and no have any problems.
Window->preference->android>logcat
maximum num of log message to buffer __ set some number 50k is ok
我建议调整 Logcat 缓冲区大小并在您的首选项中启用工作区应用程序消息监视,我的设置如下所示。
I'd recommend adjusting the Logcat buffer size and enable workspace application message monitoring in your preferences, mine are set as seen below.
在真实设备上(我的是有问题的 HTC Desire),我发现简单地禁用然后启用 ADB 并不总能解决问题。更常见的方法是禁用 ADB,关闭页面(可能是返回),然后租用开发页面,然后重新启用调试模式。
On a real Device (mine is an HTC Desire in question) I've found simply disabling then enabling ADB does not always solve it. What works more often is to disable ADB, close the page (perhaps by back) then to renter the Development page, and re-enable debug mode.
同样在这里!对我有用的是打开 DDMS 透视图并在设备窗格上单击
重置adb
Same here! What worked for me is open DDMS perspective and on devices pane I clicked
reset adb
单击“显示已保存的过滤器视图”按钮 通过显示 LogCat 的两窗格视图,您将能够在左窗格中检查活动过滤器。我曾经通过选择“所有消息”修复了空 LogCat。
Click "Display saved filters view" button By showing the two-pane view of your LogCat you'll be able to check the active filter in the left-pane. I once fixed the empty LogCat by selecting "All messages".
当 logcat 停止显示日志条目时,我发现关闭 Eclipse 并重新打开它可以解决我的问题。
When logcat stops displaying log entries, I find that closing Eclipse and re-opening it solves the problem for me.