Android Studio doesn't display logs by package name

…衆ロ難τιáo~ 提交于 2019-12-22 03:58:56

问题


After running a project in log is added filter such as "app: My_Package_Name"

in /.idea/workspace.xml added:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="AndroidConfiguredLogFilters">
    <filters>
      <filter>
        <option name="logLevel" value="verbose" />
        <option name="logMessagePattern" value="" />
        <option name="logTagPattern" value="" />
        <option name="name" value="app: com.zastavok.net" />
        <option name="packageNamePattern" value="com.zastavok.net" />
        <option name="pid" value="" />
      </filter>
    </filters>

But in this filter no results:

But if I change filter to "No Filters", all results are displayed:

How to solve this problem with logs by Package_Name?


回答1:


Logs wasn't display because my app doesn't display in process.

So finally I got it working, by: Click on

Checking 'Show all processes' checkbox!

BUT as you see in the question, checkbox was on at the beginning, so there were multiple issues.

To summarize, these are other actions to be done:

  • Kill all adb processes (use ps -x | grep adb and kill -9 ****)
  • adb start-server in terminal
  • Reconnect device
  • adb device (to make sure device is connected successfully)
  • Make sure Android DDMS Devices | logcat shows your app and only one device is listed.
  • Check Show all processes checkbox


来源:https://stackoverflow.com/questions/28147936/android-studio-doesnt-display-logs-by-package-name

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