Home > OS >  How do I fix "Error: No pubspec.yaml file found." in flutter w/ Android studio?
How do I fix "Error: No pubspec.yaml file found." in flutter w/ Android studio?

Time:10-12

I've been looking and googling for a while and couldn't find a fitting answer, I've tried different commands through the terminal, as was suggested in some forums but nothing really helped. I have this issue for some reason only with a specific project, other flutter projects that I have are running with no issues at all

For Example, I've tried to run this in the terminal and this is what I got:

Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project

Any help, suggestions, and recommendations would be much appreciated

CodePudding user response:

This problem is due to the fact that you are running the flutter run command from a different directory. Usually, when you try this command, you are in the parent directory instead of the root directory.

Try running the flutter run command from the project directory using the cd YOUR_ROOT_DIRECTORY command you can enter to that directory.

CodePudding user response:

decided to reinstall android studio and make sure that everything is correct with the PATH of the SDK, and reinstalled the SDK tools. pretty much worked for some reason

  • Related