Android logcat suddently does not show anything anymore - android

I have been using Android Studio for years but now all of a sudden the logcat messages are not displayed anymore in the logcat window of Android Studio as you can see in the screenshot. I use the following code:
Log.e("Log_AvIn:", "CategoryToBeDisplayed: " + ingredientCategoryToBeDisplayed);
However, in the "Run" window you can still see the logcat messages
I tried (almost) everything from this old post (Android studio logcat nothing to show) like restarting Android Studio, Using another Emulator, Invalidating the Caches, Restarting Logcat, Change the log level to Debug (or anything else) and back to Verbose, running adb kill-server && adb start-server in the terminal (I get an error when trying to execute this), launch ddms on the command line (I get an error when tying to execute this).
Does anyone have any further idea what I can do? As said before, it just happened recently. Before everything had been good for years.

Related

Emulator always crashes with error "Error While waiting for device: The emulator process for AVD has terminated"

I'm now stuck assuming its hardware, but wouldn't make too much sense as it used to work before, and just stopped out of nowhere.
Yesterday the whole day, when trying to open emulator on any device, in any api, in any app (including opening just the emulator by itself), I get This crash message.
I've tried uninstalling and installing android studio, and didn't work. I ended up fully formatting my pc, and installing AS again. The error persisted in the first 3 runs, and after creating a device running api 28, it shows This error (that I have had before). When I used to see it, I would still be able to run the app, but now it was just a black screen.
I found out that even though I installed the latest recommended version of AS, it didn't come with abd.exe. I downloaded the plstform-tools.zip, and when adding everything inside my sdk folder, avd stopped working. I decided to only add instead, the abd.exe file. Avd opened again, but the screen still stayed black.
I'm running amd Radeon 7500, so I decided to try an emulator running ARM64. The emulator just loads forever, but never opens up.
Right now, when I try to run api 29 or 30, instead of getting the same crash message as usual, I will just get a pop up saying the emulator was terminated, and shows in console log "error while waiting for the device: emulator proccess for avd was killed"
To add: for some random reason, all my installations today and yesterday, did not include an uninstall.exe
I tried opening emulator using CMD, and the error I get is
"cannot add library vulkan-1.dll: failed
cannot add library vulkan-1.dll: failed"
I have seen this error online, but seems like it usually shows an extra line saying "Emulator terminated with exit code" Mine does not have that.
I also have tried using Emulated performance in Software mode
Someone at Reddit was able to help me:
for anyone that gets stuck here in the future, try this:
open c:\Users(user name).Android and create a file called “advancedFeatures.ini”. In this file, write:
Vulkan = off
GLDirectMem = on

Android LogCat is showing old logs

LogCat in Android Studio is showing me only the logs from about a day ago, while "adb logcat" command and DDMS LogCat window, works ok!
What I have tried: removed just about anything android related (except projects) and reinstall everything.
I cannot believe it. The solution to this problem was to reboot my phone.

Android Studio No LogCat

Android Studio is just killing me. I'm migrating over from Eclipse and am unable to produce LogCat output. I just created a simple hello world app complete with a single line of System.out.println("hello world"); Regardless of whether I run this on an emulator or on a USB device, I get no LogCat output.
I reinstalled Android Studio, and then I got the correct output for a few executions. Now I'm back to no output. I tried restarting the computer, but this didn't correct anything.
Obviously, I can't reinstall the program every time LogCat output stops being produced, and I can't program without the ability to see console output. I'm beyond frustrated.
Here are a couple of clues:
Occasionally, I will get this error:
I am unable to run adb from the command line. Since I installed my SDK along with Android Studio, I have no idea where the adb application exists, so I don't know how to add it to my PATH variable. Even so, I don't think that this has anything to do with why LogCat output isn't produced by Android Studio.
I have tried restarting the LogCat by clicking on the icon, but this does nothing.
I realize that there are many other posts on this same type of issue, but the solutions suggested there are not resolving my issue. I am grateful for any help.
1) Don't use System.out.println. Import android.util.Log and then use
Log.e("Randall", "Hello World");
Additionally, adb should be found in your
sdk/platform-tools/adb
folder
I haven't used android studio before, I'm eclipse guy, But maybe you should try Log.d()...

LogCat stops working

If my Eclipse works for over 3 or 4 hours, and I want to debug my Android app after that time, Logcat literlly dies. Only when I restart my Eclipse LogCat reborns.
I have searched but it doesn't seem that I found any solutions to these.
Any ideas?
Thanks in advance.
Yes, it's a known problem which time to time could appears in Eclipse. My investigation lead me to suggestion that a problem could be in synchronization of ADB with IDE Eclipse. Mostly was helpful a restart of ADB.
1) go to command line (console mode)
2) change dir to ...sdk\platform-tools
3) type "adb kill-server" in command prompt and execute
4) type "adb start-server" in command prompt and execute
Then check the LogCat, most likely you will see that logs running again
The last way to resolve it - just restart an Eclipse, but this way is not comfortable
It happens to my Eclipse or Android Studio too, so what I do is I just write these two lines in onCreate method of MainActivity (activity which filter's Launcher intent)
Button button = null;
button.setText("");
this crashes my app and logcat shows crash log, then I comment out these two lines and logcat keeps working on normally. I would not restart Eclipse as it would take more time.
Restart Android Studio (realizing the question asks specifically about an Eclipse issue).

LogCat & Console stopped working with Eclipse Android Emulator

The Console and LogCat printouts stopped working in Eclipse with the Android Emulator.
I'm getting the following Exception in the Console
[2011-11-10 11:04:58 - Unexpected error while launching logcat. Try reselecting the device.]device not found
com.android.ddmlib.AdbCommandRejectedException: device not found
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:319)
at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:100)
at java.lang.Thread.run(Unknown Source)
Usually when the emulator is loading or updating an apk there's a printout in the Console telling the status. Now the Console is just blank.
I made sure the emulator is selected in the DDMS Tab.
I tried deleting and recreating the emulator in the AVD Manager. I restarted eclipse and the computer. I also updated all of the android and eclipse software in hope that the problem may get fixed. But, to no avail.
It may be related to a problem I had in my code yesterday. There was an unending loop in my code, so I had to stop the emulator mid code running.
I was having a similar error and it was driving me crazy. I just got it to work by doing the following steps:
In a shell or command prompt run: adb kill-server
Unplug the USB cable from the device and plug it back in.
Open the devices view (Window -> Show View -> Other -> Android -> Devices)
Click on the device on the android devices view.
I tested this for the emulator and it works if you relaunch the emulator instead of step 2.
Another way I got it to work was to restart Eclipse. But that's not usually ideal.
Note: Logcat would stop working any time I disconnected the usb cable from my android device (similar to killing an emulator).
I recognize this might not fix your initial issue, but it might help others who stumble on this question.
I also had the same problem, install the SDK even three times as TT, but the solution is to go to the folder android-sdk-windows, then platform-tools, and double click adb and ready!
Clean project with Project/Clean...
deleting the emulator and creating a new one did the job for me.
Even in my case a faulty code or a secret infinite loop, i think is the problem. i tried out something and logcat failed to boot up since then.
Most likely you have 2 instances of Eclipse running (I did).
(On Windows) Exit eclipse then check with the Task Manager if there is another eclipse.
End it as well as any image name "adb".

Categories

Resources