Flutter Inspector "Disconnected" when trying to open it in Android Studio, VS Code, and the web browser - android-studio

Issue occurs in Android Studio, VS Code, and when opening Dart DevTools in the browser from VS Code
Also occurs when running the app on an emulator and on a physical device. The same message is shown in the Inspector window for all of them.
I have checked everything I can, and have Googled the issue. Other people are having similar issues with DevTools, but not this specific one from what I've found. I've tried some solutions which I thought could be relevant - nothing has worked.
This was not happening the last time I used Flutter a couple of months ago. I have installed the latest updates since. Other than that, no changes on my end.
See screenshot

This was a bug in a recent release of DevTools that didn't gracefully handle versions of Flutter that were missing a new API:
https://github.com/flutter/devtools/issues/2648
This issue was fixed in version 0.9.7+2 of DevTools, which VS Code should automatically update to. If it doesn't, you can manually update with:
pub global activate devtools
Note: do not include a flutter prefix.
If pub isn't in your PATH you may need to run it with a full path like:
(flutter SDK)\bin\cache\dart-sdk\bin\pub global activate devtools

update your Futter use this code flutter upgrade

There is a recent Github issue about this. Other people are experiencing it too.
https://github.com/flutter/flutter/issues/75055

Related

E/AccessibilityBridge: VirtualView node must not be the root node. (Flutter)

This doesn’t affect my app, but this message always appears.
E/AccessibilityBridge: VirtualView node must not be the root node.
Does anyone know how to tell me how to fix this?
This was a bug in flutter engine which is now fixed in beta channel and soon will be released in next stable release.
You should just ignore these errors if possible otherwise change your flutter channel by:
flutter channel beta
Edit:
If you are using Android Studio then you can filter log. Deselecting any other option other than "Info" will remove unwanted log.
uninstall the app from the phone and then restart it and tap flutter clean
I started my app as normal, but i deleted all the content from downside all the pre code written by the flutter maybe thats why it was showing me this error but after creating a Scafold() it's gone

Location menu in extended controls of Android Studio virtual device

I need to import a .gpx file to my virtual device (something I'm attempting for the first time today), but I'm having a problem I can't find any reference to anywhere else. I'm either having a moment and missing something that should be obvious or there's an issue with the specific build I have that's causing an issue. I have Android Studio 3.5.3 installed and I've tried multiple different virtual devices.
All references to the menu page referenced in my title that I can find online look like this:
While my version of that page looks like this:
That "Import GPX/KML" button always appears to be greyed out. What am I missing here?
Eventually found the cause of this and a solution. The issue was caused by an Android emulator release that updated the Location settings to include a Google Maps based UI. Release notes here, though I've found the 29.2.11 release on 03/12 also contained the UI change: https://androidstudio.googleblog.com/2019/12/emulator-29212-stable-google-maps-ui.html. On my Windows 10 computers this also removed the option of importing a GPX file (not sure if this was an intentional choice by Google or a bug). Not sure if it will affect Linux or Mac users but I've observed the issue on multiple Windows 10 devices.
The fix I found for the issue was to downgrade my emulator to 29.2.1. That version can be found here:
http://dl.google.com/android/repository/emulator-darwin-5889189.zip
http://dl.google.com/android/repository/emulator-windows-5889189.zip
http://dl.google.com/android/repository/emulator-linux-5889189.zip
In Windows, next go to C:\Users[username]\AppData\Local\Android\Sdk\emulator. Those of a cautious disposition can backup this folder, but either way the package.xml file will be needed and everything else can be moved or deleted. Edit the details in the XML to match the version number of the downloaded emulator. Copy the downloaded files to this location along with the package.xml. Then just make sure not to download the update again when Android Studio is opened.

Dart The named parameter 'home' isn't defined

when I am trying to run an app in VS code, this message shows up "The named parameter 'home' isn't defined.".
It is a general problem for all flutter projects .flutter doctor says no issues.
I also tried creating a new project from scratch using android studio and Intellij and no progress .it says (theme: and home:) are not identified as named parameters.before that everything was perfectly fine ..please help! :(
As mentioned in the comments, it seems like you may have modified your Flutter SDK (there was previously a bug in the analysis server that made this easy to do accidentally by running quick-fixes).
There's an open issue about having flutter doctor detect this here:
https://github.com/flutter/flutter/issues/25220
For now, running the git clean command Günter gave in the comments from inside your Flutter SDK folder should get things back to normal.

Android Studio Project Can't Use AVD

I'm starting to use Android Studio for the first time, and I've run into a snag. When I followed an example and made a helloworld app, no problem. However, I tried to make my own app, which was literally just a Blank Activity, and it can't use Android Tools, or the AVD. I then deleted this project from both AS and in Windows Explorer, and remade it, multiple times. It never fixed the problem. This app was called D&D 5e Character Roller.
I then made another app called DnD 5e Character Roller, which did not have the same problem - it can use AVD and Android Tools.
At this point, I believe that it may simply be due to the ampersand in the name of the first app, but this seems like a weird reason for it to fail - it at least should have told me that would be a problem when I was trying to make the app. Is this a known problem with AS? My searching turned up nothing related to it. If not, what is the problem? If you are at home, can you try to make a similarly named project(with an ampersand) and see if you can use AVD/Android Tools, which would make it a problem with my install of AS.
Thank you.
you should have opened the module setting of your project, there sdk path or gradle version should be missing.

Cannot launch Xamarin.iOS app on device

I am developing an iPad application with Xamarin.iOS and MVVMcross. So I have a PCL with my View-Model and my Model, and an iOS project with the view. I use Visual Studio.
Before, I used Xamarin.iOS 6.3.6 beta version, and when I tried to launch the app on the device, an .app file was created and getting it with my Ipad, I could launch the application (impossible to launch directly from Visual Studio).
Yesterday, I uploaded Xamarin.iOS to 6.4.1. On simulator, everything's okay. When I try to launch the application on device, now the app is directly installed but the build stop and the following error appear in the debug output :
Failed to load AOT module '<my PCL>' while running in aot-only mode: doesn't match assembly.
And if I click on my app icon on the device,a black screen appear and disappear immediately.
Does someone know why this error appear?
This looks like something was cached somewhere or not updated correctly.
Here are a few ideas to try:
Delete the app from the device.
Clean & Rebuild your app.
Build & install from Xamarin Studio on your Mac.
Copy the Debug configuration to a new configuration (DebugTest for instance), and run that configuration instead.
I regularly get the same issue here.
The workaround that I use is to switch the platform in the Visual Studio build Configuration Manager to "iPhoneSimulator", run a quick debug session on that, then switch the platform back to "iPhone", and the problem disappears for a while.
Unfortunately I have no intelligent reason as to why this works. It seems to be doing a better job of the "Clean and Rebuild".
After reading a similar bug, I found that clearing the mtbs folder on the OS X host which is located at $HOME/Library/Caches/Xamarin/mtbs/ fixes this problem for me.
I have to do it so frequently I just have a PuTTY session open on my Windows box to clear the folder. I do hope that Xamarin fixes this issue soon.
Make sure Linker Behaviour is set to Don't Link
Clean, rebuild, remove old version from app.
Worked for me at least.
This happened to me after I upgraded to XCode 5/iOS7. I noticed a warning that I hadn't installed XCode Command Line Tools. After I did that I rebuilt the application and it now runs.
I just had this problem and got it to work again by opening the Apple project properties and changing the provisioning profile identity from "Distribution" to "Developer".
My workaround on Mac is to
Close Solution in XS
Quit XS. Command-Q
Reopen it and reopen solution.
After that it usually works again.

Resources