Flutter - The emulator is not working properly - android-studio

Changing the code and debugging the emulator also applies the previously used code and the emulator works.
I don't know what the problem is, but the updated code doesn't apply to the emulator and the code I used before runs.
I will be very grateful if you give me an answer or a hint.

Try the command flutter clean to remove the existing build output and run your app.

Related

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

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

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.

continue editing when emulator or device is testing code

Apologies if this has already been asked or not doable, but when I code in IOS or Eclipse I can make code changes even if the app is running on my device while testing some aspect. I then just rebuild and it restarts the app on the device with the modified code.
Is there a way I can do the same with Visual Studio 2012? It is very annoying if I forget to stop the device from testing the app and try type in code only to be prevented from making changes. Not a show stopper I know, but if there is a setting some where it sure would be helpful.
So in a nutshell, I want to run some code on my device (lumia 520), note an issue, make the change in MainPage.xzml.cs or elsewhere and then just restart the build and it will stop the app running on the device and restart it with the modified code.
I will keep looking myself but as it always the case, sometimes its harder to find the right question to ask than get to the answer. Hope the question makes sense and appreciate any suggestions.
Seems as its a default way Visual Studio works as I get the same issue with Visual Studio 2013. Could not find anything in OPTIONS so will leave it at that.

Android emulator constantly rebooting on Ubuntu Maverick

and thank you for your time.
I am using Titanium Appcelerator to write an app for Android, and as compared to Windows, where the emulator was quite stable, in Linux I get the following symptoms:
emulator restart with no reason, sometimes after a runtime error, sometimes right after launching my app, and sometimes just right after booting completely after being launched
emulator informs that "process $1 is not responding", where $1 is generally the system process, but sometimes may be acore, or the calendar. This may happen while installing my app on the emulator, right after loading it, or right after unlocking the screen.
As it is easy to imagine, testing code like this can be quite difficult, so I was wondering, has anyone else stumbled upon this problem, and/or know how it could be solved?
Thank you very much in advance, and pls let me know of any info I should provide.
Leo
You should verify that the emulator is working fine without Appcelerator first. Definitely update to the latest SDK (r8) and create a new emulator AVD and see if the problem is there without Appcelerator.
I think I found a solution, but I don't claim it is universally valid: I just erased the virtual device created under Titanium, changed the project file for it to use SDK 1.4.2, and had it launched again under 1.4.2. It certainly didn't build my app, but at least it created a new virtual device, which I use now to build against 1.5.0, working like a charm so far.
Thanks again Manfred for pointing me in the right direction!

Resources