Ever since clearing logcat, logcat shows nothing - android

About a week ago I cleared logcat with the "clear logcat" button on the top left of the logcat screen. Since then, nothing shows up in logcat.
This may sound like some duplicate question, but I have tried every accepted answer with no change. I need some ideas or solutions. Don't close this saying it's a duplicate please.
I have invalidated caches/restarted.
Restarted Android Studio.
Restarted my phone.
Killed, Restarted, updated the adb.
Restarted computer.
Pressed alt+6 multiple times to restart logcat.
Hit the restart button in the logcat panel. Then changed options like debug/verbose as other solutions say.
I have also checked and rechecked every field in logcat (verbose, no filter, etc) and have tried every possible combination, including the usual "fix" of verbose + no filter. I can't even get logs (Log.i, eg) to show up.
Another solution was to go to Tools>Android>Enable ADB integration. This option no longer exists.
More info: Windows 10, newest version. Android Studio 3.4.2.
Edit: My question is DIFFERENT because NONE of those solutions have worked, as stated originally.
I have also now done a complete clean reinstall of Android Studio and still no working logcat.
Edit 2: So I guess this must be a bug of some kind? No solutions after weeks of trying everything. I'll contact Android support I guess? Hopefully it works out.

Try adding debuggable: "true" to the application tag in manifest. Compile your project now and you'll saw every log in the logcat. Hope it may help you.

My model of ZTE phone does not allow logcat. People have reported the same issue with this phone. So it's the phone and not Android Studio or my app.

Related

Eclipse Activity Not Restarting on Code Change

It used to be that when I changed a piece of code and ran the project, Eclipse would kill and restart the app on my phone. I'm now getting "Warning: activity not started, its current task has been brought to the front" whenever I try to run regardless if whether I've updated code or not. I have tried deleting and adding entire code segments then running and I'm still getting this. I'm now having to resort to actually manually killing the app on my phone whenever I want to update the code. Any clue as to what is going on?
Update: one thing that I've changed recently is that I've updated HTC sync manager which has the HTC USB drivers and reinstalled Google USB drivers. Could that be the reason?
Normally It happens when you have not changed anything in your code. I had same error on emulator when I am not changing anything and still run the same code.
K looks like that you heavent mentioned you activity in manifest.
See this documentation. Or u could try to reset eclipse to default.
And if it doesn't solves ur problem then please paste the error log here...

Eclipse Android Debug Not Launching - No Errors, No Logs, Nothing

I couldn't find the answer to this on SO, so I thought I would submit a question/answer.
I'm not sure if this is version specific, so just in case it is I'm running Eclipse 3.7.2 and ADT 18.0.0.v201203301601-306762
Developing for ICS.
I spent a good portion of the morning running trying to debug my app. I would go up to the little green bug, and click on my project.
The Launch indicator starts at the bottom, fills all the way up to 100% then nothing. No errors, no log output, no logcat messages, nothing under console. For the most part, there is no output indication that something has gone wrong. It just doesn't launch.
I have been switching between and HTC device and an emulator for debugging - mostly using the device for tests right before a release.
So I thought I would plug the HTC in and try again. Plugged it in, logcat started rolling, clicked on the de-bug, same thing. No output, no logs, nothing. It just doesn't launch.
Answer.
I finally decided to (though this should have probably been one of the first things I did, however because there were no errors or log outputs, I thought this was something exotic.) check the debug configurations. Turns out that under the Target tab, the deployment mode somehow got switched to Automatic. However, I had recently deleted a virtual device. This lead to an Automatic launch, with no device selected for the launch. Thus, the launch was automated with no end point.
To me, it seems there should be some sort of error message for this sort of thing, something like, "You have not selected a device" or "Please select a device", which is why I immediately suspected a more serious issue - but hey, I'm just a developer.
At any rate, all I had to do, obviously, was to set it back to Manual and voila, she's a kickin' again.
Some may think this is a no brainer, while others more slightly crazy with a tendency to distort reality may end up having the same problem I did. So, in sympathy to the crazy/distorted reality type - here's the answer :)

getting blank screen in logcat

I have got a problem in my logcat screen and the problem is that,whenever I get error from my application I get blank screen in logcat and I am unable to look at the errors and fix them.How do I overcome this sort of issue?
here is my logcat screen:
Update your ADT plugin in Eclipse and right now you are using deprecated Logcat.
Help > Check for Updates
Go to DDMS->Devices and select the device that you are currently working on.
Just Try this command:---
adb shell
echo 1 > /sys/kernel/logger/log_main/enable
I run into that problem sometimes and I suggest:
Make sure you select the "V" tag to prove that why this happened is not because there is really no errors (Since you select the "E" tag).
Install the USB driver from the manufacturer of your device. Although you can connect the phone to PC as an USB storage device without the driver, you can't debug on the phone without it.
In Settings->Applications->Development, check the USB debugging choice to allow you to debug on the phone.
Make sure you have selected the proper device or emulator, not some other emulators or devices.
Sometimes, the logcat shows nothing, even if you have finished these steps above. In this case, click the "Clear" tag(at the top right, with a RED cross), unplug the phone and plug in again.
you have 3 things to do..
start emulator...
then see devices select your avd like Windows-show view-other-android-devices...
then start logcat Windows-show view-other-android-logcat..that's it and it will do..
But First you should see the emulator in devices..
If you can't then in devices click down arrow near camera icon and click on reset adb.
I ran into this issue in the Android Debug Monitor today. The reason this happened to me was because I had set the "maximum number of logcat messages to buffer" under Preferences/Android/LogCat to some very large amount like 50000000000. If you have played with this setting try setting it lower to like 5000. Once I configured mine back down to 50000 I started seeing messages come through LogCat again. You may have to restart things like the Android Debug Monitor, adb, the computer, the emulator, or the phone. At one point or another I tried all of those. Also you should see an error message when you try to configure this setting back to default. I believe it was a Java Null pointer or something. You can safely ignore the message and just check that the configuration worked when you go back into the Debug monitor. Good luck!
Although this question has been asked long before, I am answering for others who might stumble upon this trouble.
In Mars, eclipse 4.5 and linux using GTK 3, if Android Logcat display is missing, add the following in eclipse.ini before --launcher.appendVmargs
--launcher.GTK_version
2
May also refer these posts.
Logcat show invisible messages in Eclipse Mars
Eclipse GUI broken

Logcat data not displaying in the Log Tab of DDMS Eclipse

The log tab is visible in DDMS and I have been logging data using Log.v(...) for many a week now without any problems.
Today, the log data is now longer being displayed in the Log window. Worked, then did a programming change to track a bug and now the log data is no longer showing.
Have tried running the app on an external Android phone, on the Android Simulator and it makes no difference.
Have closed down Eclipse, reloaded and still no change.
The console displays activity but only to the point of starting the activity.
The external phone is set up for debugging - not that this could be a problem since I have the same problem with the simulator
It looks like I have inadvertantly set something incorrectly but can't remember changing anything :-(
Anyone come across this problem before - have looked at previous posts but none seem relevant.
Regards,
Oliver
I had the same problem a while back. I was using the emulator and device for debugging. Apparently you have to select the device listed in the DDMS view whose logs you want to see. My logs were blank because the device that I was expecting logs from was not the one selected.
Hope that helps
Tried this:
https://stackoverflow.com/a/9826502/1238317
Check in your logcat window - TOP RIGHT corner PAUSE button || (Pause
receiving new logcat messages)
Few clicks + eventually restart eclipse (usually works in my case)
Check your LogCat window to see if you are filtering and make sure to set the debug level to Verbose.
There are possible reasons and solutions:
LogCat might have to much in cache, clear the log and see if it fixed the issue
You might need to select the device in the device view (even if it is already selected, try to click on it)
adb is not correctly working anymore, try to kill and start it again
Check if you see output if you use the command line adb logcat
Just go to DDMS perspective and click on the device's name in upper left corner and done your log cat will Start with a BOOm :P
In Android Studio, which I have found to be much more reliable and intuitive than Eclipse, I found this to be a common issue. For me what solves it (device is automatically set when running your app) besides checking code, is to Quit and restart the emulator or Quit Android Studio and Emulator and reopen/restart

Why doesn't logcat show anything in my Android?

Why doesn't logcat show anything in my Android (while developing apps with Eclipse)?
It just doesn't print anything. It's empty.
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).
Dial
*#*#2846579#*#*
and you will see a hidden menu. Go to the Project Menu > Background Setting > Log setting and define the log availability (log switch) 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.
If clicking in Devices panel doesn't bring the spam, use reset adb in dropout menu from triangle on the right of the snapshot button.
I have the same problem on/off and the way I solved is by menu File → Restart (restart Eclipse).
Maybe you have Mylyn installed?
http://code.google.com/p/android/issues/detail?id=1808
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.
Maybe the log is not enabled in your device.
Try to run the following command.
adb shell
echo 1 > /sys/kernel/logger/log_main/enable
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 fyodorananiev.
How? Menu 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:
Replugged my Android device, which was connected to my computer via USB.
Restarted Eclipse, as mentioned by Abu Hamzah (although since I didn't know I can do menu File → Restart, I manually closed down Eclipse, and then restarted the application again.)
I can now see logs in my logcat.
Go to Developer settings and check that for Debugging\Select App for Debugging is empty
If you are using a device, the simplest check is to restart Eclipse.
You don't have to shutdown Eclipse
Use menu File → Restart
In a quick second or two you should see your LogCat return.
The simplest solution worked for me: Shutdown and restart my phone and Eclipse alike.
I had faced the same issue but in my case logs are shown when other devices are connected and not shown when my device is connected.
It took me days and finally, the issue resolved when I restarted my phone.
Below: Really dumb answer, but it happens!
My cat stepped on the space button while I was away and [SPACE]xN was typed in the search bar.
That resulted in an empty Log Cat. I tried restarting and wasted like 1 hour before I realized I should clear my search bar.
TLDR; CLEAR YOUR LOG CAT SEARCH BAR!
I think you haven't selected the device or emulator, on which running your application.
In Eclipse, go to DDMS Perspective and select the device or emulator on which you are running your application.
(Note: No need to restart Eclipse)
In case if you are using CyanogenMod 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.
It gets interesting when you find out that none of all the answers in for this question 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 logs, and none of the filter worked including the all messages (no filters)!
But it was masking another issue...
I'm working with dual screens. The second one is connected via VGA/RGB - (not really sure what it's 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.
If using the DDMS to refocus doesn't work, try closing and restarting LogCat. That helped me.
I've had this happen occasionally. Closing and re-opening Eclipse seems to fix it.
If you tried all of the others, and still got losing on an empty logcat. I got another simple way.
Download an old version of ADB, and try again. It might be working, at least working for me with Android 7.0 phone (vendor stopped updating).
Here is the useful link for old versions.
I had the same issue. No need to restart Eclipse or clean your project. You may follow:
Click on LogCat icon on bottom right corner of eclipse.
In Saved Filter Pane (Left side), double click package of your project (in my case it's com.apps..*).
In Logcate Message Filter Settings popup, select desired option of "by Log Level". You can select verbose, info, error etc.
Click Ok.
Run/Debug your project.
This is simple.
Just close the Logcat from eclipse.
Then reopen it by following steps in Eclipse.
Window - Show View - Other - Android - LogCat - ok
Hope this solves your problem.
Many times when I switched to a new Android device, I do see no more logcat messages. Unfortunately, none of the above suggestions worked for me (Eclipse Photon 4.8.0).
I am now using this . It seems to work for different devices.
Check if the Console is telling you something. Usually this happens when the project could not be installed in the device, and just shows the previous one.
The most common case I have seen this is when there are different signatures in the project, and is not running at all.
Please, read all the red letters you see. If the LogCat does not show anything, take for sure that the Console will do.
For OnePlus devices and Ubuntu OS:
Install Wine on Ubuntu
Install ADB tools on Ubuntu
sudo apt-get install android-tools-adb
Now, attach your device to PC with USB.
Open mounted "One Plus Drivers". A disc like icon
Right click on OnePlus_USB_Drivers_setup.exe and run with Wine
Then open the terminal in the present drive where your "OnePlus_USB_Drivers_setup.exe" and other driver files exists. And run
./adb_config_Linux_OSX.sh or sh adb_config_Linux_OSX.sh
Close this terminal
Open a new terminal and run
adb server-start
Your OnePlus device should prompt you to recognise your PC as a debugging agent.
Now, run on the terminal. It should show your device.
adb devices
Reference: [SOLVED] Android Studio does not recognise my One Plus Two in Linux
Set the same date and time in your Android phone and in your laptop.
I had a similar problem of logs not showing, and when I set the correct date in the phone I started seeing the logs (I restarted the phone and the hour was completely wrong!).
What worked for me besides restarting Eclipse was:
Remove custom filters
After removing all filters, logcat was filled with text again
Close logcat and then reopen it from Window → Show View → Others.
If you're using Eclipse v4.5 (Mars) (at least, Mars.1 or Mars.2), try the solution described here: Logcat show invisible messages in Eclipse Mars.
It helped in my case.
In my case (after trying all the answers provided here to no avail), the problem (and solution) has to do with port 8700:
What I needed to do is:
Exit "Android Device Monitor" (monitor.bat)
Exit all instances of Eclipse.
C:\adt-bundle-windows-x86_64\sdk\tools>..\platform-tools\adb.exe kill-server
C:\adt-bundle-windows-x86_64\sdk\tools>..\platform-tools\adb.exe start-server
C:\adt-bundle-windows-x86_64\sdk\tools> monitor.bat
Also, the Scroll Lock button, needs to be "pressed/active":
Not the other way:

Categories

Resources