我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
当前回答
重新启动Android Studio帮助了我。
其他回答
在我的例子中,它通过TCP连接断开,即使设备出现了。
调用
adb connect <device ip>
重启logcat OK。
需要连续两次按“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!!
全核解决方案。只有在尝试了所有其他方法后才使用这个方法,因为这将删除您所有的设置和首选项,以及存储的图像和所有使您的模拟器运行的东西,直到您重新安装和重新配置。以我为例,这两个步骤都花了大约20分钟,因为除了使用Darcula外,我没有进行太多自定义。
删除你的。androidstudiobeta配置文件目录
对于linux用户,这可以在/home/[username]/下找到。AndroidStudioBeta 对于windows用户,我不确定。在我看来,关于它的文件相当模糊。可能在C:\Users[你的用户]\Application Data下面
检查它是否工作,如果不能,然后重新安装SDK。
相当激烈,但我尝试了这个页面上的所有其他东西,连接设备,没有过滤器,重新启动服务,这个页面上的所有东西,它就是不工作。