How to fix the logcat problem in Android studio dolphin? - android-studio

I like the new logcat display in Android Studio Dolphin .. when it works.
For example, one thing that used to be very annoying in the past was that in many cases of app crashing, the logcat display would be reset, so you couldn't see the exception that happened, whereas with the new display, you can often see the exception.
However, what is annoying is the problem that appears randomly: you run an app from Android Studio and hope to see logs in logcat. Instead, there would be a studio.deploy error, something like
Could not remove dir '/data/data/<packageName>/code_cache/.ll/': No such file or directory'
and then no further logs would be shown.
This has been reported months ago in https://issuetracker.google.com/issues/243496470?pli=1 , but doesn't appear to have been resolved. Workarounds suggested in https://issuetracker.google.com/issues/243496470?pli=1 , such as restarting Android Studio, appear to not work sometimes, in what seems to be a random way.

Related

Problem with Android Studio emulator, keep missing (maybe crashing)

I tried to find some solution on StackOverflow but seems like there is no similar problem, I am new to android studio development. The emulator keeps missing after running for a while or I click a few things on the emulator or in my own built application. It is like a crash but does not show any crash messages, the emulator will directly go missing and show this picture below. May I know what's the problem? I tried the solution of wiping all the data on the virtual device, still had the problem
Problem with the emulator
The issue is still not solved yet, but I decided to use React Native with the android studio emulator, it works without crashing.

Screen Capture on Android Studio Emulator

I'm trying to screenshot on an Android Studio Emulator Pixel 4 XL API 30,
but whenever I try to take one, the Emulator ends itself.
And then I get the message "Lost connection to Device".
Could anyone tell me if there is a way to solve this problem?
__
I tried changing the saved folder, and restarting the emulator
I can't seem to reproduce the error.
But try the obvious: a cold boot of the emulator, and if all else fails, create a whole new emulated device. I frequently encounter weird bugs in the emulator that I solve with a hard reset.
This may be of use to you as well:
Taking screenshot on Emulator from Android Studio

Logcat is not showing anything on android studio

So I am using an emulator and logcat is empty, even my custom logs are not coming up, however if I navigate to the terminal in Android studio I can see that it's looking at my project folder instead of android-sdk/platform-tools where the adb.exe is.
When I use that terminal to navigate there and run adb logcat I can see the log fine.
Could that be the reason why the logcat is not working? And if it is how can I fix that?
I am also sure that I have logcat pointed to the correct device & project.
Thanks.
I recall that if you are in Windows some external scripts fail if your full path to adb.exe contains a space. Make sure you have your adb in a directory that has no space. For example:
This is my original adb location C:\Users\Mark A\sdk\platform-tools\adb.exe
I transferred all my folder to a new folder with no spaces and recsynched everything to make it work.
Am not sure this is your issue but it may help others.
Good luck.
I'm not sure if this will help you at all, but it's something I ran into recently after upgrading to Android Studio 1.5 that took me hours to resolve.
Because I'm sharing common code between android and non-android, I wrote my own logging interface and more than one implementation.
In the android implementation, I used "" as a tag. This wasn't a problem before I upgraded to Android Studio 1.5, messages would show up as:
I/ debugging message
However, after upgrading to Android Studio 1.5, I could still see system log messages but all my own log messages were gone.
Finally it occurred to me that perhaps now an empty tag is no longer supported and sure enough, once I added in tags that were not empty strings my debugging messages returned.
Make sure that you already choose device and application to see log.

Android studio doesn't launch in Elementary OS (Freya)

Alright, so yesterday I was writing code in Android studio, and when I saw that the autocomplete function wasn't working properly, I did the "Invalidate and Restart" function, that closed the Android Studio. And now, when I try to start Android Studio, simply nothing happens, I can spam the shortcut like crazy, nothing pops up, nothing. I was working on a project so I really need this fixed ASAP, but Google offers no clues.
I'd really appreciate any clues or fixes.
Ended up reinstalling the OS after running into some more issues with removing and reinstalling the Studio a couple of times.

Android Studio becoming unresponsive

Just moved from Eclipse to Android Studio a few days ago and everything seemed fine. Now after using it for a while I've noticed that it sometimes, seemingly at random, becomes completely unusable. The UI seems to hang for five or so seconds, then everything is alright for a couple of seconds, then hangs again. The "wheel" animation at the top right of the package explorer is spinning constantly too, but again this happens even when I've just left it for a while (No coding, no running projects etc...)
Update: Seems to start the wheel animation when I use the Full Screen mode and slowly gets more sluggish. Switching back to windowed mode after does not solve the problem.
I had a similar issue with Android Studio. In my case I opened up Activity Monitor and force quit both Android Studio and adb. Post that on restart Android studio is working fine.
I have found that closing and restarting Android Studio solved that problem.
In my case it became sluggish after about one week of intensive use without ever closing it. At first I thought it was because my app had grown too complex... The problem is probably caused by some memory leak inside Android Studio. After a restart it became ligthning-fast again.

Resources