Eclipse - Empty Logcat with Android 7
Asked Answered
H

4

29

I recently updated my Nexus 9 Tablet to Android 7 Nougat.
Since then the Logcat view in Eclipse stoped displaying Logcat messages, the view just stays empty.
Also the devices target is shown as "Unknown". If I instead start Logcat outside Eclipse (AndroidSDK->tools->ddms) it displays all messages. However, then the "Application" Column stays empty.
There are allready some (older) questions on this topic here on SO, but none of the solutions here worked for me.
What i tryed:

  • Use another USB Port
  • Focus the device in the DDMS perspective
  • Restart Eclipse
  • Reboot the device + pc
  • abd kill-server
  • disable and re-enabled USB Debuging on the device
  • Reset the USB-Debuging authorization and confirm the RSA fingerprint again
  • Switch USB-Mode to "MTP"

Every installed package from the Android SDK is up to date and i use latest Eclipse+ADT Plugin.
Also everything works fine with my Galaxy S5 Mini (Android 5.1.1).
I know, that the ADT-Plugin is deprecated and we should use Android Studio.
However I still preffer to use Eclipse as long as possible, so I am looking for a solution for this problem.
So does anyone know how to solve this issue?

Hundredth answered 6/9, 2016 at 14:8 Comment(15)
My understanding is that the LogCat protocol changed. adb and Android Studio work with both protocols. But, since the ADT Plugin is no longer maintained, it does not work with the new LogCat protocol.Llamas
So there is no way to fix that?Hundredth
Not until Andmore or somebody creates a new equivalent of the ADT Plugin, AFAIK.Llamas
okay thanks. Could the new format also be the reason for the emty "applicatoion" field in the external logcat?Hundredth
Possibly. I have no good way to know.Llamas
did you try restarting eclipse? coz this happens to me randomly with MM device MotoG (2ndGen) and an upvote for you because Devs like you and me still prefer to use Eclipse, which is the most superior Java and Android IDE :)Dawson
Yea, I restarted it multiple times (i even restarted the whole PC). Also the other device (Android 5.1.1) works perfectly. It's just that Android 7 device...Hundredth
Window - Preferences - Android - Logcat . On that page "Show logcat view if message priority is at least " select VERBOSE.Dawson
after sdk 2 update of MarshMallow it will register every device as unknown, i personally tried it and even it will give you message of update ADT when try to view layout graphic design so i did install sdk 2 MM to fix these two issues, if i find something related to N logcat issue i will definitely post here :) 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).Dawson
The "Show logcat view if message priority is at least" is allready on "VERBOSE". I also noticed, that the layout graphic design did not work under android 6. However, there it was enough to change the " rendering target" to API 22 (Android 5.1.1) and it worked again. But I can't find a similar setting for the logcat-view...Hundredth
I guess the best solution for you in general is to use Android Studio. After I switched to Android Studio I never wanted to use eclipse for android anymore. So there you go.Rockabilly
The problem is, that our android project depends on our desktop project (they use the same constants). So migrating to Android Studio won't be that easy, but it's definitely worth a tryHundredth
I wonder why you still working with eclipseGreyhound
Well, we have a desktop application and an android application, which basicly uses our desktop applications REST-Service to get and display data. We develop our Desktop application in Eclipse since many years. And as the android and desktop application share many constants (for the REST-Service), it is better if you have them in the same IDE. If you change a Constat in the desktop app, the constant used in the android app will be updated to (or at least an error will be shown). Thats a huge advantage i don't wann miss.Hundredth
See fix here: https://mcmap.net/q/120759/-android-adt-doesn-39-t-recognize-the-format-of-nougat-logcatTatiana
M
20

can use "Android Device Monitor" Application,

This application in the sdk-tools package.

Launch From the command line,

cd to the "sdk-tools folder/tools/" directory,

enter the following command : monitor.

or

windows environment,

open the directory "sdk-tools folder/tools/",

and double click monitor.bat.

detail -> Google User Guide

Murat answered 22/9, 2016 at 6:44 Comment(1)
Thats what i do now. But that means i always have to start an external tool. Also I have the problem, thaf if does not show the Application-Part of the logcat entry (it is always empty)Hundredth
M
26

I tried with this custom build and it works for me. Now I can see my logcat in Eclipse again.

https://github.com/khaledev/ADT/releases

Download the zip file then in Eclipse menu Help > Install New Software... > Add > Archive... Just pick the downloaded zip and do the rest of the install process.

Midian answered 5/1, 2017 at 13:36 Comment(4)
This should be the official answer. It actually fixes the problem. Other answers are decent "Plan B"s, but if you want this fixed, follow this answer. I tested and verified the fix. BTW, I did confirm this broke for me as well with Android Nougat on 2 different phones (Samsung S7 & LG G5). Gotta love Android. I went in to fix a 5 minute bug with an app and spent a day trying to fix this first. Ugh.Tatiana
This worked perfectly for me, thanks! Pretty soon though I feel I'm going to have to jump to Android Studio :(Hanover
Thank you so much! This has to be a bug with Win 10: I moved my project from a Win 7 PC to a Win 10 one (same version of Eclipse, same old ADT, same S7 with same Android 7.0, same cable,... - only a different version of Java) and LogCat didn't show any debug messages, while "adb logcat" (and the LogCat on the Win 7 PC) was working fine. With this custom ADT (version 24.2.0-20160729) LogCat is now working properly on the Win 10 PC too. :)Priming
Thanks for this. Was really missing the logcat for newer devices. In my case after adding the archive, I had to perform an update, not a new install. But I figured it out eventually.Rorrys
M
20

can use "Android Device Monitor" Application,

This application in the sdk-tools package.

Launch From the command line,

cd to the "sdk-tools folder/tools/" directory,

enter the following command : monitor.

or

windows environment,

open the directory "sdk-tools folder/tools/",

and double click monitor.bat.

detail -> Google User Guide

Murat answered 22/9, 2016 at 6:44 Comment(1)
Thats what i do now. But that means i always have to start an external tool. Also I have the problem, thaf if does not show the Application-Part of the logcat entry (it is always empty)Hundredth
O
0

I had the same problem. Eventually, I found out that the "Eclipse IDE for Android Developers" was out of date. Updating this feature fixed the problem. Procedure:

  • Open Help -> About Eclipse -> Installation Details

  • Select "Installed Software" tab

  • Select "Eclipse IDE for Android Developers"

  • Click "Update" in the bottom.

Otherworldly answered 19/4, 2017 at 10:17 Comment(1)
Thanks for your answer, but the Eclipse Plugin was last updated in August 2015. So I am sure, I allready have the newest version of it.Hundredth
B
0

Try to launch directly sdk tool monitor from Android SDK, it can be found in:

sdk-tools folder/tools/

you'll see monitor.bat, click on it to launch Android Device Monitor oustside Eclipse, don't forget to create a filter for your APP, go to logcat window-> Saved filters -> + -> fill your app name in "by Aplication Name"

If nothing works, in an emergency, you may try this to get logcat over command line (use cmd in windows), type :

adb logcat --pid=YOUR_APP_PID_NUMER

this shows messages from your APP. if you don't know your PID, put a line in your APP code:

System.out.println("foo stuff I can find easily when I read logcat results");

Run your app, make sure you get the up line executed.

Then in your command line type:

adb -d logcat System.out:I *:S

Find your line System.out.println("foo... and read the PID number, is next right to time data.

And then

adb logcat --pid=pid number you read from your comment line

to get logcat messages from your app in the command shell in real-time. If you just want messages output till now, just add -d modifier:

adb -d logcat --pid=pid number you read from your comment line
Bakker answered 6/8, 2020 at 10:57 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.