华为,logcat 没有显示我的应用程序的日志? [英] Huawei, logcat not showing the log for my app?

查看:40
本文介绍了华为,logcat 没有显示我的应用程序的日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,logcat 显示系统日志,但没有显示我的华为 Ascend 上的应用程序日志.如果我切换到另一台设备,例如我的 Galaxy Nexus 或 Nexus 7,则会显示同一个应用(甚至同一个 APK)的日志.

OK, logcat is showing system logs but it is not showing application log on my Huawei Ascend. If I switch to another device such as my Galaxy Nexus or Nexus 7 then for the same app (same APK even) log is displayed.

Huawei Ascend 运行的是 Android 4.1.1,它在开发者选项中开启了 USB 调试.从命令行或 IntelliJ 运行 logcat 时会发生这种情况.而且我确保选择了正确的设备 - 事实上我一次只插入一个设备.我试过重新启动 adb,清除它的缓冲区等

The Huawei Ascend is running Android 4.1.1, it has USB debugging switched on in developer options. This occurs for logcat run from either the command line or from IntelliJ. And I'm making sure that the correct device is selected - in fact I'm only plugging a single device in at a time. I've tried restarting adb, clearing it's buffer etc

我可以看到该应用程序正在华为上启动,我什至得到系统日志显示 Activity 已启动.但与其他设备不同的是,我在 Activity#onCreate(或其他任何地方)中没有应用登录.

I can see that the app is starting on the Huawei, I even get system logs showing that the Activity has started. But unlike on the other devices I get no app log in the Activity#onCreate (or from anywhere else).

08-08 20:55:44.050: INFO/WindowManager(431): Switching to real app window: Window{41ae8780 au.com.xandar.wirelesstiming.timekeeper/au.com.xandar.wirelesstiming.timekeeper.TimeKeeperActivity paused=false}
08-08 20:55:44.180: INFO/ActivityManager(431): Displayed au.com.xandar.wirelesstiming.timekeeper/.TimeKeeperActivity: +387ms

应用程序日志无法传送怎么办?

How can the application log not be getting delivered?

推荐答案

好的,因为我有另一个华为 Ascend 我遇到了同样的问题.这次我有了确切的答案.遵循这些说明(来自 denispyr 在 为什么不logcat 在我的 Android 中显示任何内容?)

OK, since I had another Huawei Ascend I ran into the same problem. This time I have the exact answer. Follow these instructions (from denispyr's answer on Why doesn't logcat show anything in my Android?)

拨号

*#*#2846579#*#*

你会看到一个隐藏的菜单.转到项目菜单 > 背景设置 > 日志设置并定义日志可用性(日志切换)和级别(日志级别设置).

and you will see a hidden menu. Go to the Project Menu > Background Setting > Log setting and define the log availability (log switch) and level (log level setting).

然后确保重新启动手机.

And then make sure you restart your phone.

请注意,这可能仅适用于华为手机.

Please note this probably only applies to Huawei phones.

另请注意,如果您使用的是华为平板电脑(例如 MediaPad M3),则无需拨号,而是在横向启动华为计算器并输入 ()()2846579()().

Also note that if you're on a Huawei tablet (e.g. MediaPad M3), instead of dialing, you launch the Huawei Calculator in landscape and enter ()()2846579()().

这篇关于华为,logcat 没有显示我的应用程序的日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆