Logcat cannot detect app or package names
Asked Answered
F

10

37

I'm using Android Studio (Beta) 0.8.7 and my logcat has been working fine for months. All of a sudden my logcat is unable to detect any app or package names. This means I cannot filter the messages for the particular app I'm testing which is very annoying. Typical logcat messages now look like this:

enter image description here

Notice the question mark (?) where the app/package name should be...

Originally I thought it was my device but I've tried it with another android device that I own and I get the same issue. This is what I've tried:

  • Restarting Android Studio and my computer
  • Killing and starting the ADB server from the terminal
  • Restarting the devices

Has anyone experienced this before? Help please as it is driving me a little crazy...

UPDATE: I tried my laptop which has android studio installed and it is doing the same thing! I'm about 95% sure that the app/package name should be there instead of the question mark because that's the way I remember it. Also with a question mark the logcat is unable to filter messages by the app's package name...I never had this problem in the past so it must have been working so I can't be going crazy...

Fulk answered 26/8, 2014 at 11:32 Comment(7)
I am having the same problem... It was working until like 2 days ago. What's weird is that I can see the package name in Device Monitor, but not in Android Studio! Did you manage to fix this?Pleach
I honestly have no idea what fixed it. But ti fixed itself after 2 days. It is possible that the addition of "debuggable true" to my app's build.gradle file may have fixed it. So try that!Fulk
Thanks, but what fixed it for me was reinstalling Android StudioPleach
Update: the real fix is to go Tools > Android > Enable ADB integration.Pleach
I had this issue just today, but it turned out to be my phone's fault. I fixed it by going to developer settings and toggling ADB off and back on, then also revoking USB debugging authorizations.Cannonball
The real reason for this is that the developers of Android and Android Studio at Google have no interest in whether something works or not. They lack the pride, professionalism and basic human decency that it would require to ship products that work logically and properly.Balthazar
This might be useful for newer versions of Android Studio: https://mcmap.net/q/81015/-adb-shell-logcat-with-package-nameIndaba
A
34

Same problem here with Android Studio 1.0 RC2. The Device Monitor shows the application name but in Android Studio's logcat panel, the package name is always a question mark.

I fixed the problem by Checking Tools / Android / Enable ADB Integration and then restarting adb.

A simpler way to is to Debug any app, if ADB integration is disabled, Android Studio will prompt you to enable.

You have to enable ADB integration to launch debugging. Do you want to do that?

Click Yes, of course.

Albumose answered 4/12, 2014 at 10:28 Comment(3)
In my case, the monitor detected device but not the app i.e., it said No debuggable process. After toggling Enable ADB integration it worked. (Android studio 2.3.3)Topfull
I have the same problem in Android Studio 3.1.4, but there is no Android / Enable ADB option in the Tools menu.Indaba
There is no longer such option in the menu. Debugging works fine, yet every process is "?".Chaisson
I
4

Ran to the same problem on android studio.Tried connecting to the emulator(Intel emulator image with virtualization) and launched the app on the emulator and see if the application field comes back to logcat by logging with your app

Also do not forget to add - android:debuggable="true" under application in your AndroiManifest.xml

Eclipse don't see this problem because apparently Eclipse enables debugging automatically

Infection answered 26/8, 2014 at 11:49 Comment(2)
It works for the emulator just fine. It seems as though the app/package names are missing for external devices only...this is very annoyingFulk
It says let the tools specify debuggable, don't do it yourself.Pistol
P
4

Check in your "tools -> android" if you have the option enable ADB integration checked - that was my case, that for some reason the package name was not visible like in your case.

I think there might be some keyboard shortcut that is toggling the effect as I'm sure I did not change this myself, however manual checking the option and restarting emulation (just hit run) solved the problem.

Patchouli answered 5/2, 2015 at 10:56 Comment(1)
I have the same problem in Android Studio 3.1.4, but there is no Android / Enable ADB option in the Tools menu.Indaba
Y
0

What i did: First i tried ADB integration. Then i rebooted the device and it worked. My opinion: I don't think ADB integration will solve it.

Yellowlegs answered 3/1, 2015 at 11:43 Comment(1)
I have the same problem, but rebooting doesn't help unfortunatelly.Indaba
N
0

An answer can be found here (#4)

It says: "Enable ADB Integration in: Tools / Android / Enable ADB Integration"

Nashom answered 25/1, 2015 at 15:47 Comment(0)
H
0

I have the same problem with that.

Now I have solved by using the Debug Mode. After execution of the debug mode, you can run in normal mode forever. You'll see the application name in Logcat now.

Hillaryhillbilly answered 16/5, 2015 at 10:3 Comment(2)
What do you mean by using the Debug Mode, how?Indaba
The Debug Mode means launch app with debug. The hot key is Control + D on MacOS and Shift + F9 on Windows.Hillaryhillbilly
A
0

This is what worked for me: My Tools / Android / Enable ADB Integration was already ticked, but package name was not on log cat. I unticked ADB Integration and again clicked to re-enable (tick) ADB Integration. Magically, the package name was there in log cat. Not sure if this works for all.

Amphiaster answered 12/6, 2015 at 15:2 Comment(0)
D
0

Non of above method (1: check Enable ADB Integration, 2: use debug mode) work.... It become normal just "Randomly". Has anyone got the same situation as mine?

**** Update the method works for me ******

  1. close the eclipse (I use it for my another java project)
  2. in terminal, type "adb kill-server"
  3. restart the Android Studio.
Detainer answered 25/9, 2015 at 17:11 Comment(1)
I have the same problem in Android Studio 3.1.4, but this 3 step method doesn't help unfortunatelly.Indaba
S
0

This question helped me with my issue and I would like to add my humble addition about solving this problem when it appears again even with enabled ADB integration.

Simply start Android Studio before emulator. I'm using Genymotion(2.6.0) and used to start it before Android Studio(2.1.2) in my situation this bug was revealed.

Sippet answered 17/6, 2016 at 18:13 Comment(0)
S
0

Enable ADB integration to launch debugging.
It works for me:

  • First Close App.
  • Go to Phone Setting >> Application >> Open App.
  • See On Log Cat Module is Visible.

If it's not working, then go to Tools >> ADB >> Restart.

Syce answered 2/3, 2020 at 6:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.