Organizational Research By

Surprising Reserch Topic

why doesnt logcat show anything in my android

why doesnt logcat show anything in my android  using -'android,eclipse,logging,logcat'

asked Oct 7, 2015 by thiru
0 votes

Related Hot Questions

11 Answers

0 votes

I had this same issue but my fix was much more basic:

If the LogCat panel is empty in Eclipse the emulator doesn't have the focus. Go to the DDMS perspective and try clicking on the 'emulator' entry in the Devices panel (top-left screen).

answered Oct 7, 2015 by mcasudhir
0 votes



and you will see a hidden menu. Go ProjectMenu / Background Setting / Log setting and define the log availability (log swith) and level (log level setting).

Please note this may apply to Huawei phones only as is stated for an Ideos X3 (here) and is tested at a Honor U8860.

answered Oct 7, 2015 by thiru
0 votes

While the answer provided by MoMo will resolve the problem temporarily it will most likely reoccur the next time you launch Eclipse, or launch on a different Emulator/Device.

Instead of always having to select my device in the devices view I've found a better solution is to go into your Eclipse preferences and navigate to Android -> LogCat in the list on the left and then enable "Monitor logcat for messages from applications in workspace".

This way no matter what device you are using logcat will automatically start showing output from it as soon as the application launches.

It will also setup a filter that ensures that only output from your application is displayed, which you can reuse / disable as needed.

Logcat application output enabling setting

answered Oct 7, 2015 by tejas lakhani
0 votes

OK. This is how I got it to work. I first followed MoMo's advice, that is...

If the LogCat panel is empty in Eclipse the emulator doesn't have the focus. Go to the DDMS perspective and try clicking on the 'emulator' entry in the Devices panel (top-left screen).

But to no avail.

I then attempted to reset adb (Android Debug Bridge) as suggested by furikuretsu. How? Window -> Devices -> upside down triangle menu button -> Reset adb.

It also didn't work, but I did get the following message:

Android hierarchyviewer: Unable to get the focused window from device

This meant that MoMo was right in that my Android device or emulator didn't have focus. However, the solution I did in my case is different.

What worked for me:

1) Replugged my Android device, which was connected to my computer via USB.

2) Restarted Eclipse, as mentioned by Abu Hamzah (although since I didn't know I can do File -> Restart, I manually closed down Eclipse, and then restarted the application again.)

I can now see logs in my logcat.

Hope this helps you too.

answered Oct 7, 2015 by mannar kande
0 votes

I think, you haven't selected device or emulator , on which running your application,

In eclipse go to DDMS Perspective and select device or emulator on which you are running your application.

(Note: No need to restart the Eclipse)

answered Oct 7, 2015 by deepak07.s
0 votes

If you are using a device, the simplest check is to restart eclipse.

** you don't have to shutdown eclipse **

use File > Restart

in a quick second or two you should see your LogCat return

answered Oct 7, 2015 by gauravg.gwl
0 votes

It gets interesting when you find out that NONE of ALL THE ANSWERS in this thread were helpful.

And then you find out that in your version of ADT 22.6.3.v201404151837-1123206 if you add two filters with the same package name(application name) then the log will not appear.

It was weird because the log was there two seconds ago, and launching the app in debug mode adds a default filter for the app which collides with the filter I've setup manually, and then ADT magically removes all the log, and NONE of the filter worked including the All messages(no filters)!

I hope I saved someone some time... I was at it for almost an hour.

==== UPDATE ====

And then I spent another short while figuring that this was masking another issue...

I'm working with dual screens, the second one is connected via VGA/RGB - (not really sure how its called) and what can I do, I'm a ton more comfortable with the logcat away from my code editors, so I've placed it in another window, and as it turns out that is the main reason for the disappearing logs for me.

answered Oct 7, 2015 by atulpariharmca
0 votes

Check if the Console is telling you something. Usually this happen when the project could not be install in the device, and just show the previous one. The most common case I has seen this is when there are different signatures in the project, and is not running at all. Please, read all red letter you see. If the LogCat does not show anything, take for sure that the Console will do.

answered Oct 7, 2015 by patelnikul321
0 votes

I had the same issue. No need to restart Eclipse or clean your project. You may follow:

  1. Click on LogCat icon on bottom right corner of eclipse.
  2. In Saved Filter Pane (Left side), double click package of your project (in my case it's com.apps..*).
  3. In Logcate Message Filter Settings popup, select desired option of "by Log Level". You can select verbose, info, error etc.
  4. Click Ok.
  5. Run/Debug your project.
answered Oct 7, 2015 by girisha
0 votes

What worked for me besides restarting eclipse is:

  • Remove custom filters

After removing all filters, logcat was filled with text again Hope this will be helpful to someone else

answered Oct 7, 2015 by vimaldas2005
0 votes

In case if you are using cynogenmod in your mobile it will disable logging by default, try this method:

In your device, open "/system/etc/init.d/" folder If there are many files, try opening each file and find for this line:

rm /dev/log/main

Now, comment this line like this: # rm /dev/log/main

save the file and reboot.

answered Oct 7, 2015 by 20shahi