Logcat not displaying my log calls

前端 未结 30 1712
悲&欢浪女
悲&欢浪女 2020-11-28 22:45

I\'m a total noob at Android programming, and wanted to learn how to debug my apps. I can\'t seem to have my Log.i|d|v calls displayed in the LogCat.

Here\'s the

相关标签:
30条回答
  • 2020-11-28 23:29

    Best solution for me was restart adb server (while I have Enabled ADB integration in Android studio - Tools - Android - checked). To do this quickly I created adbr.bat file inside android-sdk\platform-tools directory (where is adb.exe located) with this inside:

    adb kill-server
    adb start-server
    

    Because I have this folder in PATH system variable, always when I need restart adb from Android studio, I can write only into terminal adbr and it is done.

    Another option to do this is through Android Device Monitor in Devices tab - Menu after click on small arrow right - Reset adb.

    0 讨论(0)
  • 2020-11-28 23:32

    Restart Eclipse and check log cat will be displayed.

    0 讨论(0)
  • 2020-11-28 23:33

    None of the other answers worked for me, but this did:

    I removed my project from my workspace, then deleted anything that started with a dot (.settings, .project, etc.) from the project folder. Then I re-imported the projected. I'm missing some settings and breakpoints but at least it works.

    0 讨论(0)
  • 2020-11-28 23:33

    I restarted the ADB service as well with "adb usb" and fixes the problem for me. In fact, only one of my activities didn't log anymore. All the others did log stuff. After restart adb everything works like a charm again. For the other people who're searching for another solution: adb kill-server, adb start-server in CLI will often fix your problem aswell.

    0 讨论(0)
  • 2020-11-28 23:34

    I figured out I was automatically importing com.sileria.Log (from some library project) instead of android.util.Log, where the latter was the correct one. Check your imports as well.

    0 讨论(0)
  • 2020-11-28 23:34

    Easiest way:

    Check in your logcat window - TOP RIGHT corner PAUSE button || (Pause receiving new logcat messages)

    Few clicks + eventually restart eclipse (usually works in my case)

    0 讨论(0)
提交回复
热议问题