我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
当前回答
Easy fix that worked for me (after trying some of these other suggestion). My logcat was sitting blank in a separate window (on my second screen). Just had to drag the Logcat tab back to it's original place in the debug panel next to the Debugger and Console tabs, and VOILA... it began immediately updating and showing all processes verbose. So (If your logcat is anywhere outside of the debugger panel (i.e. the logcat tab isn't sitting nested alongside the debugger and console tab) then it won't receive updates and will sit there blankly. Don't know if this is an issue with older versions of Android Studio. But again, easy to try and if it works... it works!!
其他回答
需要连续两次按“Alt+6”重新启动logcat窗口。这样它就会显示日志输出。
问题主要发生在调试模式。
Easy fix that worked for me (after trying some of these other suggestion). My logcat was sitting blank in a separate window (on my second screen). Just had to drag the Logcat tab back to it's original place in the debug panel next to the Debugger and Console tabs, and VOILA... it began immediately updating and showing all processes verbose. So (If your logcat is anywhere outside of the debugger panel (i.e. the logcat tab isn't sitting nested alongside the debugger and console tab) then it won't receive updates and will sit there blankly. Don't know if this is an issue with older versions of Android Studio. But again, easy to try and if it works... it works!!
我的问题解决了,在我添加android:debuggable="true"下应用程序在你的androimanifes .xml(甚至ide标记为错误的语法!????)
奇怪的是,即使是在最近版本的Android Studio上,仍然会遇到这个问题。我通读了一长串的解决方案,但它们对我不起作用。 接受的答案适用于早期版本的Android Studio(我猜是v2.3)
我做了以下让Logcat再次工作:
Logcat >只显示选中的应用>不显示过滤器
Logcat >不过滤>只显示选中的应用
我期望重置logcat应该理想地给我同样的效果,但它没有。手动切换滤镜是唯一有效的方法。
这是在Android Studio 3.0.1(稳定)(我不能在完成当前项目之前更新它) 问题发生在我早上启动Android工作室继续我晚上留下的工作时。我希望开发人员能研究一下这个问题。从stackoverflow中尝试了超过15个解决方案,仍然没有看到任何结果。为这个问题的未来受害者揭示另一种解决方案甚至令人恼火。
对我来说,问题是我有两个名称相同的模拟器(我创建了它,删除了它,然后用相同的名称再次创建它)。在logcat下拉菜单中有两个模拟器条目,它连接到错误的一个。我所要做的就是换到另一个。我通过重命名模拟器永久地避免了这个问题。