Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Setting VM flags failed: unrecognized flags: disable-dart-dev

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

like image 849
AMISHA NARSINGANI Avatar asked Dec 06 '25 05:12

AMISHA NARSINGANI


1 Answers

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.

like image 89
Fardeen Khan Avatar answered Dec 09 '25 15:12

Fardeen Khan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!