Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android logcat "application" column is always empty

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

enter image description here

like image 276
Alexey Zakharov Avatar asked Jan 24 '13 19:01

Alexey Zakharov


People also ask

Why is my Logcat empty Android Studio?

Go to the File option > click on “INVALIDATE CACHES/RESTART” then a dialog box will pop up, Select the “INVALIDATE CACHES/RESTART” button. This will automatically restart and build the index of android studio.

What is PID in Logcat?

pid = process ID. uid = user ID of the application that owns that process. gid = group IDs of the application that owns that process.

How do I find app logs on Android?

Navigate to device settings and enable Developer Options (see section for ADB logs) Navigate to Developer Options and tap on Take/Submit Bug Report. Select Full Report when prompted to get the full device info along with the logs. The bug report takes up to 2 minutes to be generated.


4 Answers

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.

like image 92
aij Avatar answered Sep 30 '22 19:09

aij


Another idea:

adb kill-server
adb start-server

Worked for me.

like image 43
Murmel Avatar answered Sep 30 '22 20:09

Murmel


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

like image 4
Ranjithkumar Avatar answered Sep 30 '22 18:09

Ranjithkumar


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.

like image 1
Rhomel Avatar answered Sep 30 '22 20:09

Rhomel