Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logcat cannot detect app or package names

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...

like image 733
pauloz1890 Avatar asked Aug 26 '14 11:08

pauloz1890


People also ask

Why is Logcat not working?

Solution 1: Restarting your Android StudioIn your IDE Go to File > Invalidate Caches and Restart > Invalidate and Restart. This Solution will clear all the caches of Android studio IDE and restart it automatically, By the method, there are 80% change that Logcat will start work as before.

How do I restart Logcat?

Solution 1: Restarting Logcat You need to press Alt + 6 twice to restart the Logcat. Restarting logcat often helps when it becomes irresponsive.

What is regex in Logcat?

regexp,AndroidStudio,logcat. Logcat provides several default filter options (Verbose, Info, Debug etc) and a simple pattern match filter, but the regex filter is the most powerful option for customizing logcat output.


2 Answers

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.

like image 63
Arrix Avatar answered Sep 28 '22 10:09

Arrix


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

like image 41
min2bro Avatar answered Sep 28 '22 10:09

min2bro