Logcat cannot detect app or package names

拜拜、爱过 提交于 2019-11-30 01:24:13

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.

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

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.

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.

An answer can be found here (#4)

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

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.

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.

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!