43

I am using Eclipse classic to develop my Android applications. But I am not able to see any messages in the LogCat. Till yesterday it was showing each and every message, but now it is not showing anything. I have written a lot of log statements to trace my program, but because of this I am not able to trace.

Where is the problem?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Chandra Sekhar
  • 18,914
  • 16
  • 84
  • 125

19 Answers19

70

Try these first

  1. Go to the device tab, click your device. and go back to the logcat tab
  2. You might have filter set.
  3. You are probably viewing the wrong package.
Not a bug
  • 4,286
  • 2
  • 40
  • 80
CChi
  • 3,054
  • 1
  • 20
  • 15
36

I've got it solved by:

  1. Closing the logcat window

  2. Running the following in command prompt:

adb kill-server
adb start-server
  1. Opening logcat again
André
  • 4,417
  • 4
  • 29
  • 56
vijeth.ag
  • 515
  • 5
  • 8
  • I tried all the above answers, only this works with me, thanks. Note: Instead of command prompt task manager can be used to kill adb, and then run the app again. – user2814778 Apr 20 '15 at 09:39
  • Cheers. It's only fix that worked for me. – Adam Maloney Sep 05 '18 at 08:04
  • only this works me. its really frustating.why logs are suddenly not showing. Tried everything. Its was like only at the mercy we can see sometimes. now this solves the problem – Santhosh Aug 16 '20 at 05:58
  • This didn't work for me either (in addition to 1st trying the accepted answer (https://stackoverflow.com/a/9529698/2597758) – WebViewer Dec 05 '22 at 12:44
10

Go to Window - Preferences - Android - Logcat . On that page "Show logcat view if message priority is at least " select VERBOSE.

Preferences-Android_logcat

Burhan ARAS
  • 2,517
  • 25
  • 19
  • 2
    Please always explain in your answer what this does and how it solves the problem. That would be very helpful. – Benjamin Basmaci May 14 '19 at 07:56
  • This didn't work for me either -- in addition to trying https://stackoverflow.com/a/9529698/2597758 and https://stackoverflow.com/a/20193542/2597758 -- it appears the making LogCat work has lots of preconditions. – WebViewer Dec 05 '22 at 12:50
10

Every now and then I experience that the logcat output in Eclipse stops showing any logs. It doesn't matter if I unplug and plug the device. It seems like the issue occurs if the logcat gets a ton of messages, and is unable to handle the amount.

The only thing working is restarting Eclipse or use DDMS directly (which also suffers from the same problem).

Eric Nordvik
  • 14,656
  • 8
  • 42
  • 50
9

This happens when you don't close eclipse for a long duration, just close eclipse and reopen it, your problem should be solved.

Giridhar Karnik
  • 2,213
  • 4
  • 27
  • 47
7

Correct answer: it is/was a bug in Eclipse. All I did to trigger it was to rename one of the filter and pressing the Run button.

Restarting Eclipse fixes it.

Henrik Erlandsson
  • 3,797
  • 5
  • 43
  • 63
6

In eclipse, go to: windows->preferences
Then go to Android->logcat and make sure you have the following setup:
1. double-click action: "go to problem (error line)
2. switch to: java
3. both checkboxes are checked

if your setup is fine, clean the project and restart eclipse

good luck!

Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129
4

Some times it does happen on a slower machine that eclipse waits for emulator HOME screen and after waiting too long it shows that the emulator is offline. Secondly Make sure that you are looking in the correct filter or in all messages part.

Also you can do the following :

  1. select the device and find your process (e.g. "com.android.myapp")
  2. Look for its process id written to its left (eg. 17260)
  3. Now go to logcat and add a new filter by witting a particular name and the specific Pid (say 17260)
  4. Now select that filter and you'l be able to see your log messages

Good Luck!

Ganesh Somani
  • 2,280
  • 2
  • 28
  • 37
3

I had the same issue, but gave up on eclipse logcat panel and switched to cygwin+adb:

  1. make sure the app is running and launch cygwin
  2. cd /cygdrive/c/android_sdk/sdk/platform-tools #go to where adb.exe is
  3. [optional] ./adb logcat -c #clean the log, obviously don't do this if you want to see some old messages
  4. ./adb logcat #see all messages

or

  1. ./adb logcat | grep "whatever" #look only for whatever you want to look for
alexey
  • 453
  • 6
  • 15
  • Tried every other solution listed to no avail. Although, I'd still rather it show up in Eclipse logcat panel, at least this command line option gave me access to the info I needed. Thanks for the idea. – Alex Sep 05 '14 at 00:11
1
  1. Go to Device from DDMS and open it.
  2. Select your device from which device your application is running
  3. Select your project which you run on this device
Krunal Shah
  • 1,438
  • 1
  • 17
  • 29
1

I had this issue for the last few days and tried everything above.

As it turned out, my problem was that all my log statements were in a class that was not being reached. I thought it had because of what was being displayed but that was not the case.

So in short, check with the following

Post log statements at the beginning of every method.

Merlin -they-them-
  • 2,731
  • 3
  • 22
  • 39
1

I too had the same problem , and I solved the issue by -> restart the eclipse -> go to ddms -> click on the emulator

Jyotika Pandey
  • 233
  • 3
  • 5
  • 12
1

I tried all the above solutions, but nothing did work. Then, I saw I had a button named "R", then something clicked in my mind, I renamed it to:

R1=(Button) findViewById(R.id.button1);

So maybe it was conflicting with R of Android and Java name of a button "R".
Hurray error got resolved.

Let us conclude with the following steps:

  1. Check if u have any variable(button,textview) name which is “R”
  2. Save your project, close Eclipse and then open it again.
  3. Project --> clean
  4. import android.R; remove this.
  5. Correct answer: it is/was a bug in Eclipse. All I did to trigger it was to rename one of the filter and pressing the Run button. Restarting Eclipse fixes it.
Andre Silva
  • 4,782
  • 9
  • 52
  • 65
Savan
  • 449
  • 1
  • 4
  • 3
1

You might have switched off LogCat by Mistake

  1. Go to Preferences>Android
  2. Click LogCat and make sure there is a check next to "Monitor logcat for messages from applications in workspace"
  3. Then select the dropdown "Show logcat view if message priority is at least" and choose "VERBOSE" (or depending on how you tag your Logs, but VERBOSE will get all output)
  4. Click "Apply" and you should start seeing your messages again
GraSim
  • 3,830
  • 1
  • 29
  • 35
1

Make sure that you set

android:debuggable="true"

in your manifest file.

molu2008
  • 1,237
  • 2
  • 15
  • 20
  • 3
    Warning: `Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one.` – Lenik Aug 26 '14 at 08:09
1

I was facing the same problem and the following steps resolved the issue:

  1. Restart my Eclipse
  2. Restart my Emulator
  3. Select devices tab from DDMS perspective in Eclipse.
Chilledrat
  • 2,593
  • 3
  • 28
  • 38
Arti
  • 11
  • 1
1

Check the device is not at fault. My device was set not to log, accidentally disabled it via boeffla kernel. After turning it back on logcat worked fine.

Guernica
  • 246
  • 5
  • 21
1

Go to windows->preference->android->logcat

select the option - show logcat if message priority is atleat verbose.

It will show all the events of device and close all the perpestive and open logcat it will be working again.

Helping Hands
  • 5,292
  • 9
  • 60
  • 127
KlwntSingh
  • 1,084
  • 8
  • 26
0

On right top corner click on "Display Saved Filter View" or if "display saved filter view" is already open then just click on the red - icon to delete selected logcat filter.

RichieRich
  • 19
  • 7