Dart The named parameter 'home' isn't defined - android-studio

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.

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

Flutter - The emulator is not working properly

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.

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.

Visual Studio deployment error

"The application could not be launched for debugging. Please make sure the device is unlocked."
I am getting this error when I try to launch the app on my device for debugging.
I have tried the following:
Relaunch Visual Studio,
Reinstall Visual Studio,
Restart my computer,
I have selected both debug and release in the configuration window.
The problem is that its not getting launched even in the emulator. The emulator opens and never loads the app but gives the same error message. And I have tried to just open a new application on VS and tried to run the default application. That also gives the same problem.
Everything was working fine after I opened a few more projects for reference, It suddenly started giving this error message.
Make sure a Windows project is not set as startup(assuming you have both windoes project and phone project in the same solution). For example If your target platfrom is a Windows phone project WP7, then you cannot have a windows project as startup. This is a known reason for the error you mentioned.
Also what is the operating system you are working with? I know the error you mentioned reprorted on some OS's including Windows server 2003 and 2008. Try running your project in winsdows 7.
I suddenly got exactly the same issue today. I was coding like always and then I got this problem.
// P.S.
// Today I updated Windows from 8 to 8.1
// Then I installed VS 2013 preview
// But continued working in VS 2012 (I need R#)
// After ~ 5 hours of work I got this issue
I tried everything, deleted emulators from Hyper-V, deleted all virtual commutators, restarted VS 2012, restarted laptop, deleted Bin and obj folders from project, rebuilded project.
But nothing helped.
Then I tried to open solution in VS 2013 preview, and it works!!
I hope I help you with this answer.
If somebody know how to fix it in VS 2012, please tell us
I have a similar problem but I’m able to debug my app once I click OK on the error prompt following the “Launching TaskHost.exe failed.” message in the status bar. I haven’t been able to solve it but I’ve found a workaround that might also work for you.
Start the “Simulation Dashboard” under “Tools” and instead of starting the debugger the usual way build your project if needed and then try to start the debugger by clicking “Locked” under “Lock Screen” on the dashboard.
This answer worked for me.
Under the following:
Solution(Right-click) > Properties > Configuration Properties > Configuration
Ensure that your main project is set to 'Deploy.'

Resources