Error: Setting VM flags failed: unrecognized flags: disable-dart-dev
Basically you had a missing PATH variable to the powershell executable. You can find it in the directory : C:\Windows\System32\WindowsPowerShell\v1.0
. After that close all cmd's and powershell windows and reopen and run flutter doctor -v
to setup Flutter SDK properly. This may take some minutes, like if it starts downloading Dart SDK too. Also if you are on master branch try switching to stable branch.
AMISHA NARSINGANI
Updated on December 21, 2022Comments
-
AMISHA NARSINGANI over 1 year
When I create or clone a flutter project in android studio it shows "Error creating project Setting VM flags failed: Unrecognized flags:disable-dart-dev"
I am using Android Studio version 4.0 and I have made couple of android and flutter apps before. Creating or running project never generated errors.
After cloning the project, I have tried "Pub get" command and "get dependencies" command which gave the Unrecognized flags error. To give it a try, I also run the "upgrade dependencies" command which gives me another error: "Flutter device daemon #3: process exited during startup. Exit code: 255, stderr: Setting VM flags failed: Unrecognized flags: disable-dart-dev"
For information, I already have updated versions of flutter(1.17.2) and dart plugins. The cloned Project name is "magic-8-ball-flutter" github link for the cloned project
upgrade dependencies error after cloning project opening a cloned flutter project
creating a project error when creating a new flutter project