Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logcat doesn't show anything

I was working on my Android application and using Eclipse to build it and displaying some values in Android Logcat.

Everything was working fine, but suddenly now when I run my application, Logcat does not shows anything. I tried to run my other application, but still it remains blank.

What is reason for this behavior, how can I get it back working again?

like image 202
karan Avatar asked May 13 '13 20:05

karan


People also ask

Why is my Logcat not showing anything in Android?

Go to the File option > click on “INVALIDATE CACHES/RESTART” then a dialog box will pop up, Select the “INVALIDATE CACHES/RESTART” button. This will automatically restart and build the index of android studio.

Does Logcat require root?

No, you don't need root to get logcat information. To do it, you probably want to download the Android SDK and run "adb logcat", using the adb tool that comes with the SDK. Alternatively, you could install the ADT Eclipse plugin and use its handy streaming Logcat viewer. Save this answer.


3 Answers

Try this:

On Linux or Mac OS X:

./adb kill-server
./adb start-server

On Windows:

adb kill-server
adb start-server

This will restart the adb and everything should work fine.

like image 192
Ahmad Avatar answered Nov 15 '22 23:11

Ahmad


Sometimes this problem occurs when you run on your PC two instances of Eclipse, for example on different workspaces. So, to avoid repeating problem you should use only one instance of eclipse.

To repair logging you should do following steps:

  1. Unplug the device
  2. Close all Eclipse windows
  3. Restart adb in command line: adb kill-server and than adb start-server
  4. Run again Eclipse and connect device

Sometimes help other method. Go to Eclipse Window > Perspective > DDMS and than from Device sub-window choose Reset adb

like image 24
Michal Avatar answered Nov 16 '22 00:11

Michal


It happened to me as well but I think the problem is in the DDMS.

You can try the following:

  • Open DDMS perspective
  • Go to the Devices tab (If you have no open go to Windows -> Show Views -> Devices)
  • Click on the open emulator and you should see the log again
like image 42
Jorge Casariego Avatar answered Nov 16 '22 00:11

Jorge Casariego