I've just been working on a flutter project this evening. All has been going fine, running on the emulator and my real device. All of a sudden, Android studio (3.1.1) can no longer see my emulators or physical devices, despite the fact that adb recognises them in the terminal.
The issue occurs when I edit by pubspec yaml and add
assets:
- images/logo.png
As soon as I remove it I can see my devices again.
Does anyone have any clues as to what might be happening? I feel sure it's something stupid I've done though I literally can't think what, and the last hour of googling hasn't got me anywhere, so I need to ask for a little help.
Thanks in advance,
Mike
Related
Okay, so I just installed Android Studio on my new (to me) Macbook Pro. It's a mid 2014 model with i7 and 16Gigs of ram. It's fully updated to what Apple will allow, which should be plenty for Android Studio.
I've setup Emulators and coded with them using Flutter through VSCode no problem.
When I go into the terminal and run adb, all I get is Segmentation fault: 11. That's it, nothing else. It simply will not run. I plug my phone in, and of course it's not detected. I can run adb devices, which just shows none.
I've tried googling, but it seems Segmentation fault: 11 is super popular, so I can't find my way through the weeds to anything related to what I'm experiencing.
So, I've gone into Android Studio and forced it to remove the platform tools and reinstalled them through the Brew command, same thing. Is it that the latest version is incompatible with Big Sur? Should I install an older version of Android Studio? Has anyone else run into this problem? I'm hoping I'm simply overlooking something simple, but I can't for the life of me figure it out. I'm hoping to get a bit of feedback before I have to dump the whole thing and put an older version on. I have the emulator working nicely, I just want to use a physical device too.
Okay, so maybe this will help a fellow adb noob out. I recently (finally) figured out my problem, sort of. At least it's working now, so that's all I care about.
Okay, so, the first thing I ran into was that I was using a power cable, not a data cable. Rookie mistake there. So, once I had that head smacking realization, at least my phone started acting normally with the debug request.
That is, once I ran across an article the pointed out adb start-server existed. I mean, it makes sense. Maybe I'm wrong, but I would have figured that just typing adb into the terminal by itself would try and start the adb server. So, once I got that working, it finally connected with just the minimum pain that seems to go along with these types of things.
Still, I cannot understand why calling adb by itself causes a Segmentation fault, but I'll leave that up to the people who work on Android Studio to figure out, cause I'm moving on.
I'm not really sure how to word this.For some reason when I install an app that I'm working on from Android Studio it runs very slow (when an option is pressed it takes 10-20 seconds to register). But if I install the app from either my coworkers Android studio or adb from my own machine it works fine.
My specs are:
OS: Windows 10
Android Studio Version: 3.0.1
Phone OS: Android API 24
It was working fine this morning, but during the course of the day, something has happened. Has anyone run into this sort of problem before?
I'm using a Samsung Galaxy S8 physical device. I have tried a factory reset on the phone which worked for one install after I changed some things I'm back where I started. I have also restarted both the machine and phone multiple times. I'm at a loss as to what is going on. If you guys need any more info let me know. Also INSTANT RUN IS NOT ON.
EDIT: I'm at a total loss as to why this is happening. I've tried everything from restoring the phone, reinstalling Android Studio, changing wires, changing settings, but nothing is working. If anyone has a suggestion I will gladly try anything.
I've finally found a solid solution to my problem. I'm positive now that something went wrong with m usb drivers for windows 10. I went to this page https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/windows-10-slow-usb-30-transfer-speeds/a5e1eebb-74bb-4777-8902-5131f3e8ec3e and I completed the steps in method 1 and that did the trick for me. it took a while to find this out, but hopefully, someone else will find this helpful.
Have you compared your yesterday build and today build which is making your app slow. Any Significant change in code?
Have you set up breakpoints or similar? Some debugging options can significantly slow the app down at runtime. When this happens, if you disconnect the phone from ADB - e.g. pull out the cable - and it speeds up again, then it's likely related to your debug connection to that particular instance of Android Studio.
The title speaks for itself, but I would add some pointers I've noticed along the way.
I would like anyone who also experiences the end result while developing for Android to try to reproduce this and see if this scenario is really the case.
The crash happens when Logcat is overpopulated. By overpopulated I mean that from a point in time, if you would leave a device connected in debug mode for a while, and you would look at the Logcat view, it would display only the new 'delta' lines added to the log in the past short interval of about two seconds.
If you would pay attention, while the Logcat is overpopulated, the device which is been debugged, responds slowly to user interaction (this can be your indication, that the Logcat is overpopulated while testing your application), and perform other actions ridiculously slow.
If you would leave the device connected and more logs would be added, there is a short interval 5-10 seconds, where Eclipse starts to behave weird, and after that, there is nothing you can do, Windows 7 freezes and only hard reboot allows you to get back to work.
I can reproduce this every time, if I would just leave a device connected in debug mode with an application running.
I've Googled this and came up with nothing. I assume that if me and my colleagues encounter this (we have the same Eclipse setup), then other should also experience this, so before posting a bug, I would like to confirm this...
Details:
Windows 7
Eclipse 3.6
ADT 10.0.0.v201102162101-104271 (latest for today)
I have the same problem here. I've been troubleshooting this for months! Mostly because it's been extremely difficult to find anyone with the same issue. (I was actually linked to this post from the bug report that Android Developer provided.)
I've been working with someone on a similar Stack Overflow issue. He thought the problem was his IDE until I reported that I was experiencing the same issue, but with a different IDE. Together, we've been able to whittle the problem down to either the device itself or the drivers. We recently just excluded the USB cables as the culprit.
However, the problems reported in the Google bug report are exactly what we've been experiencing. It makes sense that ADB might be where the problem ultimately lies.
Hopefully, this post will help create some search-friendly connections between the other posts.
Other Stack Overflow post mentioned above -- Android development in IntelliJ IDEA causes computer to freeze
Google bug report, Issue #24171 (originally posted by Android Developer) -- http://code.google.com/p/android/issues/detail?id=24171
I also have a similar problem. Sometimes, the Windows OS completely freeze when an Android device is connected.
I'm not sure why it happens, but I think that it only occurs when the ADB is active.
Here's a bug report I've found recently about this:
adb causes whole Windows operating system to freeze randomly
After using a USB from the back, and installing Windows 8, the problem doesn't occur any more.
However, it's Windows 8, and I wish I used Windows 7. For some reason, Microsoft didn't provide a way to go back...
Try setting your Eclipse Android Settings for the maximum amount of logcat messages in the buffer to a lower value.
This should help
I don't want to jump to conclusions, but I think I've found the real issue which causes this halt...
I'm going to make some assumptions, and if one of these does not fit your scenario, let me know:
Assumptions:
This only happens on a chargeable computer... Be very very sure before dismissing this assumption.
This happens when a laptop is connected to the adapter, and is being charged.
Cause:
This happens when you use a custom adapter, and not one that 100% fit your computer.
According to my experience, once I've used my home adapter on my work computer, the crash reoccurred over, and over, and over... drove me nuts... and when I got back to work, and used the proper adapter, the issue vanished!
Same with my home computer, and work adapter.
Lend me your thoughts...
I've setup Netbeans using nbandroid (http://kenai.com/projects/nbandroid) which has been working just fine for the last few days. I've already made a small app which runs in the emulator and even on my phone.
The thing I can't get to work is the debugger console in netbeans.
If I add these lines of code to my app nothing appears in any of the output screens in netbeans.
System.out.println("blaat");
Log.d("info", "blaat")
Even though I'm 100% sure the code should run. Any suggestions on what I might have missed?
Try opening a new cmd prompt and type "adb logcat".
Ok, just found a better solution in another question:
Android Debugging with Logcat and Emulator. Is it possible?
started using ddms, which is exactly what I wanted.
I use IntelliJ IDEA to write Android apps, and use the DDMS Windows application to view the Android logs (separate from the IDE). It works fine, but after a seemingly random period of time, the logs vanish, except for one line of log, which gets overwritten with incoming logs. I have to shut it down and restart it, which combined with the delays of deploying an app to a device over ADB to debug and test is pretty tiresome.
Is this a known issue with DDMS? Is there anything I can do to make it work consistently without breaking itself?
Are there any other Android log viewing applications for Windows that work better? I'm not very fond of the IntelliJ IDEA one. My favourite is actually CatLog on Android itself, but on a small-screen device it's not a great experience.
It's not about the time, but number of lines being recorded. As Dave C said in the comment, just clear the log and it will be fine
Have you tried looking at "Why doesn't LogCat show anything in my Android?"? The top voted answer may solve your problem