How to enable LogCat/Console in Eclipse for Android?

↘锁芯ラ 提交于 2019-11-25 23:26:14

问题


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


回答1:


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

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

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

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.




回答2:


Write "LogCat" in Quick Access edit 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




回答3:


In the Window menu, open Show View -> Other ... and type log to find it.




回答4:


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"....


回答5:


Go to your desired perspective. Go to 'Window->show view' menu.

If you see logcat there, click it and you are done.

Else, click on 'other' (at the bottom), chose 'Android'->logcat.

Hope that helps :-)



来源:https://stackoverflow.com/questions/3280051/how-to-enable-logcat-console-in-eclipse-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!