Android logcat “application” column is always empty

后端 未结 7 1774
粉色の甜心
粉色の甜心 2021-02-04 00:32

Android logcat \"application\" column is always empty. I have latest version of android tools.

\"enter

相关标签:
7条回答
  • 2021-02-04 00:38

    I ran into this problem today. What worked for me was to connect to the emulator (if you have an Intel CPU with virtualization capabilities, run the Intel emulator image with virtualization--it is much faster), launch the app on the emulator and see if the application field comes back to logcat by logging with your app.

    For me when connected to the emulator started showing the Application column after trying a few log actions that wrote to the log. After that I connected back to my actual device (Nexus 7), launched the app again from Eclipse, and set DDMS back to the application running on the Nexus 7, and the Application column magically appeared again.

    Prior to this I tried various devices (Nexus 4) and restarting Eclipse/adb but nothing worked until I connected to the emulator.

    0 讨论(0)
  • 2021-02-04 00:42

    I've tried to fix this strange bug but nothing works. Sometimes application name is blank in logcat and sometimes it's there. I can't even reproduce it. This is not an answer but my quickfix.

    Browse through entire logcat and somehow identify the PID of your application and just filter for that in logcat search like this

    pid: 10036

    or whatever your app PID is.

    0 讨论(0)
  • 2021-02-04 00:57

    I tried all the other suggestions here and none of them worked. For me, the application is shown when running on the emulator, but not on my Galaxy Nexus.

    It turns out I needed to add android:debuggable="true" to <application> in my AndroiManifest.xml. See http://developer.android.com/guide/topics/manifest/application-element.html. People who use Eclipse don't see this problem because apparently Eclipse enables debugging automatically according to http://developer.android.com/tools/device.html.

    Apparently apps need to be marked as debuggable to debug them on production ROMs, but they can be debugged anyway on debug ROMs, which is why it works on the emulator but not on the physical device. Another option is probably to build a debug ROM and install it on your device.

    You'd think logcat should be able to figure out the application based on the PID rather than needing to have the app built for debugging.

    0 讨论(0)
  • 2021-02-04 00:57

    Another idea:

    adb kill-server
    adb start-server
    

    Worked for me.

    0 讨论(0)
  • 2021-02-04 00:59

    On my particular case (I'm using Netbeans plus standalone Android Debug Monitor) the "application" column comes back after I:

    1. "Force stop" the app from the device
    2. Run it again from Netbeans > "Run Project"
    0 讨论(0)
  • 2021-02-04 01:01

    you should enable ADB integration through Tools -> Android, before run your app. Then the log cat will work correctly.

    Tools->Android->Enable ADB Integration active

    enter image description here

    0 讨论(0)
提交回复
热议问题