简体   繁体   English

如何在Eclipse for Android中启用LogCat / Console?

[英]How to enable LogCat/Console in Eclipse for Android?

在Android中处理一个简单的程序时,我错误地关闭了LogCat窗口,我想知道如何再次显示它。

In Eclipse, Goto Window-> Show View -> Other -> Android-> Logcat. 在Eclipse中,转到窗口 - >显示视图 - >其他 - > Android-> Logcat。

Logcat is nothing but a console of your Emulator or Device. Logcat只是模拟器或设备的控制台。

System.out.println does not work in Android. System.out.println在Android中不起作用。 So you have to handle every thing in Logcat. 所以你必须处理Logcat中的所有事情。 More Info Look out this Documentation . 更多信息查看此文档

Edit 1: System.out.println is working on Logcat. 编辑1:System.out.println正在使用Logcat。 If you use that the Tag will be like System.out and Message will be your message. 如果您使用该标签将类似于System.out并且消息将是您的消息。

Write "LogCat" in Quick Access edit box in your eclipse window (top right corner, just before Open Prospective button). 在日食窗口的快速访问编辑框中写入“LogCat”(右上角,就在Open Prospective按钮之前)。 And just select LogCat it will open-up the LogCat window in your current prospect 只需选择LogCat,它将打开当前潜在客户的LogCat窗口

在此输入图像描述

在“ Window菜单中,打开“ Show View - >“ Other ...然后键入log以查找它。

In the "Window" menu, open "Open Perspective" -> "Debug". 在“窗口”菜单中,打开“打开透视图” - >“调试”。

替代文字 click On the plus image icon(you see the below image at status bar), and then select "Logcat".... 单击加号图标(在状态栏上看到下图),然后选择“Logcat”....

Go to your desired perspective. 转到您想要的视角。 Go to 'Window->show view' menu. 转到“窗口 - >显示视图”菜单。

If you see logcat there, click it and you are done. 如果你看到那里的logcat,点击它就完成了。

Else, click on 'other' (at the bottom), chose 'Android'->logcat. 否则,点击“其他”(在底部),选择“Android” - > logcat。

Hope that helps :-) 希望有所帮助:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM