android - 华为,logcat 没有显示我的应用程序的日志?

标签 android android-studio adb logcat huawei-mobile-services

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

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

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

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

应用程序日志怎么会没有送达?

最佳答案

好的,因为我有另一个Huawei Ascend,我遇到了同样的问题。这次我有确切的答案。按照这些说明(来自denispyr 对Why doesn't logcat show anything in my Android? 的回答)

Dial

*#*#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).

然后确保你重启你的手机。

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

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

关于android - 华为,logcat 没有显示我的应用程序的日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18124334/

相关文章:

android - 我有一个应用程序/网络应用程序,但我找不到构建它所需的答案

AndroidHttpClient 关闭后无法 getEntity().getContent()

java - 在 NavigationDrawer 中单击按钮打开 Activity

java - 运行应用程序时布局不显示

android - 每次启动新构建时,RSA指纹都会更改

Java:运行多个 shell 命令?

android - 如何在Fragment实现中展示不同的Activity?

Android-Studio(或一般的 IDEA)重构多个源集

安卓 2.3 : Read-Only file system stuck

android - 如何设置限制从Android上传图片到数据库MySQL