简体   繁体   English

Android Studio中某些设备没有Logcat输出

[英]No Logcat output for certain device in Android Studio

I realize that this question has basically been asked ad infinitum, but I haven't been able to find a solution that works for my case. 我意识到这个问题基本上是无限问题,但我找不到适合我案例的解决方案。

I'm using Android Studio 1.5, debugging on a LG-MS770, running Android 4.2.2. 我正在使用Android Studio 1.5,在LG-MS770上进行调试,运行Android 4.2.2。

The other devices I have tested with function perfectly (HTC One M8, Samsung Galaxy S5, Note 4, multiple others, along with numerous virtual device configurations), but this phone produces absolutely zero Logcat output. 我测试的其他设备功能完美(HTC One M8,三星Galaxy S5,Note 4,多个其他设备,以及众多虚拟设备配置),但这款手机产生的Logcat输出绝对为零。 There is nothing for my application, nor any other processes running on the device. 我的应用程序没有任何内容,也没有任何其他进程在设备上运行。 If it's relevant, the other measurements in the Android Monitor (Network, Memory, CPU, GPU) all output fine. 如果它是相关的,Android监视器(网络,内存,CPU,GPU)中的其他测量值都可以正常输出。

I've ensured that debugging is enabled through USB. 我确保通过USB启用调试。 (I can step through breakpoints, but Log.d("TAG","log") shows nothing. (我可以单步执行断点,但Log.d("TAG","log")显示任何内容。

I've also tried the usual fixes to this issue: restarting logcat, making sure the filter is set correctly, running adb kill-server & adb start-server , disconnected and reconnected the device, restarting Android Studio and my PC, all to no avail. 我也尝试过这个问题的常规修复:重启logcat,确保过滤器设置正确,运行adb kill-serveradb start-server ,断开连接并重新连接设备,重启Android Studio和我的电脑,一切都没有无济于事。

Does anyone know any other solutions to try? 有谁知道尝试其他任何解决方案? Or perhaps something specific to this device? 或者也许这个设备特有的东西?

Thanks! 谢谢!

EDIT: 编辑:

The device is rooted, and has a custom rom based on CyanogenMod 11 该设备已植根,并具有基于CyanogenMod 11的自定义ROM

adb logcat -d prints the following: adb logcat -d打印以下内容:

reloc_library[1331]: 20370 cannot locate 'android_log_setColoredOutput'... CANNOT LINK EXECUTABLE

Is this related to the custom rom? 这与自定义ROM有关吗?

The Problem is with your custom ROM. 问题出在您的自定义ROM上。 It has an incompatible "liblog.so" included. 它包含一个不兼容的“liblog.so”。 I guess it is not a official build from CyanogenMod. 我想这不是CyanogenMod的官方版本。

I would recommend updating to Android 5.0. 我建议更新到Android 5.0。 I found a ROM here: http://androidforums.com/threads/rom-v5-0-lolipop-nightly-for-lg-motion-ms770.882980/ 我在这里找到了一个ROM: http//androidforums.com/threads/rom-v5-0-lolipop-nightly-for-lg-motion-ms770.882980/

I'm not sure if this setting is saved, when you close the Android Studio. 当您关闭Android Studio时,我不确定此设置是否已保存。 But may be there are some characters in your search box for the logcat. 但是您的搜索框中可能有一些字符用于logcat。 If it is not empty, it will try to search for the String in the log, if it is one that is never used, you wont see anything... 如果它不为空,它将尝试在日志中搜索String,如果它是一个从未使用过的,你什么都看不到......

Some devices actually "disable" log messages from levels "lower" than INFO, so DEBUG and VERBOSE messages won't show up by default. 某些设备实际上从“INFO”级别“禁用”日志消息,因此默认情况下不会显示DEBUG和VERBOSE消息。

You must run the /system/bin/setprop log.debug_level 1 command from adb shell to "flip the switch". 您必须从adb shell运行/system/bin/setprop log.debug_level 1命令以“翻转开关”。

This only lasts until you reboot the device. 这只会持续到您重启设备为止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM