问题
I am using Eclipse classic to develope 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 og log statements to trace my program, but because of this I am not able to trace.
Can anybody say where is the problem? Thanks...
回答1:
Try these first
- Go to the device tab, click your device. and go back to the logcat tab
- You might have filter set.
- You are probably viewing the wrong package.
回答2:
I've got it solved by:
Closing the logcat window
Running the following in command prompt:
adb kill-server
adb start-server
- Opening logcat again
回答3:
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).
回答4:
Go to Window - Preferences - Android - Logcat . On that page "Show logcat view if message priority is at least " select VERBOSE.

回答5:
This happens when you don't close eclipse for a long duration, just close eclipse and reopen it, your problem should be solved.
回答6:
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.
回答7:
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!
回答8:
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 :
- select the device and find your process (e.g. "com.android.myapp")
- Look for its process id written to its left (eg. 17260)
- Now go to logcat and add a new filter by witting a particular name and the specific Pid (say 17260)
- Now select that filter and you'l be able to see your log messages
Good Luck!
回答9:
I had the same issue, but gave up on eclipse logcat panel and switched to cygwin+adb:
- make sure the app is running and launch cygwin
cd /cygdrive/c/android_sdk/sdk/platform-tools
#go to where adb.exe is- [optional]
./adb logcat -c
#clean the log, obviously don't do this if you want to see some old messages ./adb logcat
#see all messages
or
./adb logcat | grep "whatever"
#look only for whatever you want to look for
回答10:
- Go to Device from DDMS and open it.
- Select your device from which device your application is running
- Select your project which you run on this device
回答11:
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.
回答12:
I too had the same problem , and I solved the issue by -> restart the eclipse -> go to ddms -> click on the emulator
回答13:
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:
- Check if u have any variable(button,textview) name which is “R”
- Save your project, close Eclipse and then open it again.
- Project --> clean
- import android.R; remove this.
- 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.
回答14:
You might have switched off LogCat by Mistake
- Go to Preferences>Android
- Click LogCat and make sure there is a check next to "Monitor logcat for messages from applications in workspace"
- 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)
- Click "Apply" and you should start seeing your messages again
回答15:
Make sure that you set
android:debuggable="true"
in your manifest file.
回答16:
I was facing the same problem and the following steps resolved the issue:
- Restart my Eclipse
- Restart my Emulator
- Select devices tab from DDMS perspective in Eclipse.
回答17:
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.
回答18:
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.
回答19:
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.
来源:https://stackoverflow.com/questions/9529628/why-logcat-is-not-showing-anything