Logcat is not showing anything on android studio - 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.

Related

How to fix the logcat problem in Android studio dolphin?

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.

Flutter not building app without error at all

My Flutter project was working just fine. I lost my Internet connection for a bit and when it came back I got a pop up talking about an Android Configuration found for the project, I clicked Add, then it started showing me two Device slots on the Upper tab where it shows what devices are connected.
Now if I need to run my app on my device, Flutter simply tries to run the project, then stops without any output in the Run Tab of Android Studio. This is really giving me a headache... I wish it gave an error or something. Someone please help me so i can resume development.
if you have not changed anything in the android directory the easiest thing to do is to delete it, then run in the terminal
flutter create .
if you have changed a lot of things in the android you can copy your changes and do the same or can go an revert the gradle configurations manually.

Android Studio 4.0 doesn't recognize any previous virtual devices

First post--be gentle. Can't find any posts on Android Studio 4.0, so I hope this isn't a repeat. I updated Android Studio from 3.6.3 to 4.0 on Windows 10 (1909). Had created a couple of virtual devices in 3.6.3 (a Pixel 2 running API 28 and a Pixel 3 running API 29)--both worked great in AS-3.6.3 and I could develop apps, compile, load, and run them with no problem.
After the update to AS-4.0, the virtual devices no longer appear in the devices box at the top of the GUI--it just says "No Devices". When I open the AVD Manager, I can see them, and I can start them (although when I start them I get a pop-up saying "AVD Manager: Unable to locate adb"), but I can't get any code to download and execute on it. On the Pixel 3 emulator, I also get another pop-up saying "Detected ADB: Could not automatically detect an ADB binary.", and it gives instructions to resolve it, which don't make any difference (jump into extended controls and toggle "Use detected ADB location").
When I try to open a past project and run it, I get the same behavior--no devices found.
I've also tried making new emulators, hoping the new setup would recognize them, but to no avail. Tried starting and restarting AS, as well as the computer, also to no avail. I have Android SDK Build-Tools 30-rc4, the latest Android SDK Command-line Tools, Android Emulator 30.0.12 Android SDK Platform-Tools 30.0.1, and the Intel x86 Emulator Accelerator all installed.
I've Googled and spoken words of fierce power over this for several days now. Any suggestions for how to get AS-4.0 to recognize the emulators? I've resisted uninstalling everything and starting over--was hoping it was just a configuration thing.
Thanks in advance,
Uber
After some more Googling, I found the answer here (I think my constraint of wanting an answer for AS-4.0 specifically kept me from finding it):
Could not automatically detect an ADB binary - Android Studio
I had to redownload the SDK platform-tools zip file and reinstall it. I don't know why the old one got messed up with the migration from AS-3.6.3 to 4.0, but there you go--such is life with complicated software.
As soon as I replaced the old platform-tools directory with the new one, all my old emulators showed up and I was back in business.
Thanks anyway!
Uber

How to resolve symbols #mipmap and #style in Flutter project?

A while ago my designed Flutter app was running like it should in simulation (virtual device) in Android Studio. After some updates of both Flutter as Android studio I am not able to get the app in simulation. I am new to Flutter and Android studio (have a little knowledge of Xcode, 2 apps in the store) so I have looked at stackoverflow first to find a solution. All tried suggestions did not worked for me and I am hoping somebody can help me.
I have an original version of the project which was running in simulation mode. Now I am working in a duplicated version to find out how to get things up and running again. It worked before but why does Flutter or Android Studio give an error now? The folders and content do exist. Perhaps it is a simple thing to solve but it is not in my knowledge.
What to do to solve the error message I get as shown in the screendump?
The problem seems to be with the resources,
this should help.
Android Studio error: cannot resolve symbol in Xml
Or try to run "flutter clean" (usually solves many problems)
Flutter studio sometimes does not resolve those (no idea why).
Try opening the same Android project in Android studio and check it from there.
Once back, try File->Invalidate Caches/Restart
If they exist and the name is right (without extension), then it could be it.

android studio 3.1.1 not reflecting changes in apk

I have read at least 5 responses to this but none has worked so far... In windows 10, Android studio 3.1.1 (the latestest version, april 2018) I have an app which I have made some changes in but that changes do not deploy in the AVD. The bugs listed that it's supposed to have been corrected for this version persist, and none of the solutions for this problem I have found worked. Could anyone Help me solve this somehow? I have spent days in this... Thanks.
By the way, the app I have to modify is in react-native.
Firstly, please try cleaning your project and building the app. To achieve this, please click in menu bar Build and choose Clean project. Then go to Build tab again and click Rebuild project.
Also, please try to restart your AVD.
Optionally, go into settings of your AVD and uninstall your app manually. Then click play button and choose your AVD to run your app on this AVD.
If the problem persist please provide more info. Especially please give us more info if you are using gradle build tools, if yes then what info does the gradle console give you, etc.
Ok, if you are sure none of above work, please tell me if your changes are reflected on another, possibly new AVD?
Do you have a chance to try your app on real device connected to your computer in debug mode (Developer Tools active, computer trusted and usb debugging allowed)? Do you see changes in your app on device?
Let's give another try to something like this: please open build.gradle file, then make some slight change in it (like add some space). Android Studio should notice change in gradle file so it will prompt you with yellow bar above with option: Sync Now. Does your app reflect changes after that?
And lastly, are you sure your changes are not reflected? Can you add something logging to Logcat (i.e. Log.d("test", "this should print in logcat debug level.."); ).
Another edit, have you tried this?
Open MainApplication.java in the android/app/src/main/java/{packagename} directory, delete the following code if exist:
import com.facebook.react.BuildConfig;

Resources