我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。

有人能给我解释一下如何在Android Studio中使用logcat吗?


当前回答

检查一下你是否把它藏起来了……如果它隐藏的问题,通过给定的图像显示它或ALT + 6

其他回答

在Android Studio 0.8.9中,我打开Android设备监视器,从设备列表中选择模拟器,并在LogCat选项卡中获得输出。

之后,我回到Android Studio的主视图,在Android DDMS选项卡的右侧选择Restore Logcat视图,它就在那里!

如果这不起作用,你可以在Android设备监视器中看到你的日志猫,就像我在第一句话中解释的那样。

在“设备logcat”选项卡的右侧有一个按钮“只显示所选进程的logcat”。它并不完美,因为每次我运行另一个进程时,我都需要再次推动它,但这是唯一适合我的解决方案。到目前为止…

在android Studio应用程序中,您需要单击调试应用程序选项(Shift+f9)以调试模式运行并启用LogCat。

检查一下你是否把它藏起来了……如果它隐藏的问题,通过给定的图像显示它或ALT + 6

所有这些都无济于事,我的日志猫功能失常。

After a lot of angry searching I found a solution that seems to work: 1. Make sure logcat itself is working (use DDMS from Tools->Android) and if it does close DDMS window again 2. Now go to Tab 5 (Debug), there select Logcat (this is not the same logcat as in Window 6!) 3. The window is empty just like Window 6, but now start a debugging run. For me logcat in the Debug window now started to show all the stuff again! Also when normally running the application the Debug->logcat view is still functional while the Tool Window #6 "logcat" is disfunctional as before

这是一个黑客,但是它会导致正常的logcat行为,突出显示您调试和开发所需的行和语法。 从现在开始,您需要通过调试窗口访问它。