我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
我昨天安装了Android Studio,我试着用LogCat查看日志。但是日志里什么都没有。我使用终端运行。/adb logcat,它工作。
有人能给我解释一下如何在Android Studio中使用logcat吗?
当前回答
我刚把它修好了。在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.
其他回答
修复一些不必要的更改的最佳方法是使缓存无效
转到FILE ->,单击“INVALIDATE CACHES/RESTART”,然后弹出一个对话框, 选择“无效缓存/重新启动”按钮。
Android studio将自动重新启动并重新构建索引。
重新启动Android Studio帮助了我。
查看LogCat Sitteng 在我的情况下,我不检查每一件事,使我
我再次检查一切为我工作
就我而言,我试图用其他答案来解决这个问题,但没有结果。我无意中发现,空标签几乎从未显示(Android Studio 1.4)。因此,尝试在TAG中放入任何字母(空格无效)。
Log.wtf("x", "Android Studio Team, solve this, please!");
一些自定义rom出于性能原因禁用日志记录(尽可能压缩%)检查rom的内置应用程序或调整rom的菜单来启用此功能。
我在我的i9505上运行贵山的Galaxy S4 Rom,我不知道它默认禁用了日志记录,以获得最分钟的性能提升,但显然这在定制的“性能”导向型Rom上并不罕见。我花了一段时间才发现这一点-非常烦人,因为它会显示我有多少消息被记录,而不是他们的细节。