Android studio logcat not working

前端 未结 20 2141
迷失自我
迷失自我 2020-12-16 09:55

There is very awkward thing I am facing logcat is shown in debugging application but while running(not debugging) application it is not showing logcat .

I tried rest

相关标签:
20条回答
  • 2020-12-16 10:14

    I fixed the issue by changing the USB Options of my phone from "Charging only" to "Transfer files (MTP)"

    0 讨论(0)
  • 2020-12-16 10:15

    Besides what other guys said, look if you have written something in the search box that causes this problem(it was my case).

    Note: Even in case of a restart, what you have written in search box won't delete and you need to delete it yourself.

    0 讨论(0)
  • 2020-12-16 10:18

    on The top left of logcat there is an option to choose the emulator. may it's not selected the current emulator by default. try to changing it to current emulator and it will fix.
    image

    0 讨论(0)
  • This feels really stupid, but I spent a couple hours struggling with the same issue. I tried every other answer in this thread, but what fixed it for me was Cleaning and then Rebuilding. Apparently when I ran, it wasn't actually rebuilding the APK, just running the one that had already been made.

    0 讨论(0)
  • 2020-12-16 10:19

    Try the following Steps:-

    Step 1. Goto File > Invalidate Caches and Restart > Invalidate and Restart. Android Studio will restart automatically and logcat will work as expected.

    Refer screenshots :

    Step 2. If Step(1) didn't worked then try this : Goto Terminal > cd till your platform-tools directory (eg. in Windows default location is C:\Users\\AppData\Local\Android\Sdk\platform-tools). Now type following command :

    adb kill-server

    adb start-server

    Step 3: If Step(1)&(2) both didn't worked then simply try clicking on Re-Start Logging button available in Logcat option. Refer screenshot - (Green colour curved arrow with grey box)

    0 讨论(0)
  • 2020-12-16 10:21

    I tried all the above answers. Helped restart the device (HTC)

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