我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
当前回答
Windows用户:
使用脚本工具。确保您已经为系统设置了ADB环境。 Android Logcat脚本
保存到bat文件 编辑文件。用包id替换com.example.abc 双击打开文件或通过MobaXTerm打开(方便查找文本)
p/s:如果这个答案有帮助,让我们把我的回购星。谢谢!
其他回答
我刚把它修好了。在DDMS显示的最右边寻找恢复Devices Logcat视图和ADB视图的小图标。
When the DDMS first came up with both the "ADB Logs" and the "Devices | logcat" tab showing. The "Devices | logcat" is the one that should be showing the device output, but was blank. Somehow I managed to hide one or the other of those tabs, I forget exactly how. But, off to the right there was a tiny icon that said "Restore ADB" view, and I clicked it and it came up. Then there was another tiny icon that said "Restore Devices logcat view". I clicked that, and all of a sudden it appeared and was showing the device output again.
这些帮助了我:
1.启用ADB集成 2. 进入Android设备监视器 检查您的设备是否在线,并创建所需的过滤器
就我而言,我试图用其他答案来解决这个问题,但没有结果。我无意中发现,空标签几乎从未显示(Android Studio 1.4)。因此,尝试在TAG中放入任何字母(空格无效)。
Log.wtf("x", "Android Studio Team, solve this, please!");
我有同样的症状,但我的问题要简单得多,这真的是我的错误。我的滤镜设置错了。
解决方案只是验证我设置了正确的过滤器。
尝试点击“Android”视图最右边的图标,你应该在Android视图上看到Logcat选项卡(你可以通过按Alt+6打开Android视图)