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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3280051/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 09:27:17  来源:igfitidea点击:

How to enable LogCat/Console in Eclipse for Android?

androideclipselogcat

提问by Rakesh

While working on a simple program in Android, I mistakenly closed LogCat window and I want to know how to show it again.

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

回答by Praveen

In Eclipse, Goto Window-> Show View -> Other -> Android-> Logcat.

在 Eclipse 中,转到 Window-> Show View -> Other -> Android-> Logcat。

Logcat is nothing but a console of your Emulator or Device.

Logcat 只不过是模拟器或设备的控制台。

System.out.printlndoes not work in Android. So you have to handle every thing in Logcat. More Info Look out this Documentation.

System.out.println在 Android 中不起作用。所以你必须处理 Logcat 中的每一件事。更多信息 请查看此文档

Edit 1: System.out.println is working on Logcat. If you use that the Tag will be like System.out and Message will be your message.

编辑 1:System.out.println 正在处理 Logcat。如果您使用该标签,则该标签将类似于 System.out,而 Message 将是您的消息。

回答by AndyW

Write "LogCat" in Quick Accessedit box in your eclipse window (top right corner, just before Open Prospective button). And just select LogCat it will open-up the LogCat window in your current prospect

在 Eclipse 窗口(右上角,就在 Open Prospective 按钮之前)的快速访问编辑框中写入“LogCat” 。只需选择 LogCat,它就会在您当前的潜在客户中打开 LogCat 窗口

enter image description here

在此处输入图片说明

回答by Aaron Digulla

In the Windowmenu, open Show View-> Other ...and type logto find it.

Window菜单中,打开Show View->Other ...并键入log以找到它。

回答by Paresh Mayani

In the "Window" menu, open "Open Perspective" -> "Debug".

在“窗口”菜单中,打开“打开透视图”->“调试”。

alt textclick On the plus image icon(you see the below image at status bar), and then select "Logcat"....

替代文字单击加号图像图标(您会在状态栏看到下图),然后选择“Logcat”....

回答by Roei Bahumi

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 :-)

希望有帮助:-)