Logcat is often out of work

十年热恋 提交于 2019-11-28 07:03:44

问题


Logcat is often not working, showing nothing. It's very unlivable. Restarting eclipse everytime it happens is too annoying. Is there anything I can do to solve it? Thanks


回答1:


Sometimes the Logcat is empty in Eclipse because the emulator doesn't have the focus. Go to the DDMS perspective and try clicking on the 'emulator' entry in the top-left screen.

Can be even more confusing if there's also a real G1 connected, then you have to choose from which one you want to see the output :)

Hope this helped.




回答2:


I just always keep logcat open in my terminal instead of eclipse. Just navigate to your platform-tools folder and type adb logcat




回答3:


Eclipse only has a limitted buffer to display the logcat. There's a little clear button somewhere on that page, I forget where. Press that, it will clear the logcat and start displaying again.




回答4:


Even adb logcat shows weird stuff and stops working after a while for no apparent reason: logcat.png. Eclipse restart and Android device restart doesn't help.

however console: adb logcat -c does work.




回答5:


This also happens to me when I'm running both an avd in the emulator and usb debugging on a physical device. The avd will not give up focus, even though I'm loading the apk onto the device for debugging. I can fix by closing the avd.




回答6:


Sometimes you selected certain session filter by mistake. 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".



来源:https://stackoverflow.com/questions/4446014/logcat-is-often-out-of-work

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