简体   繁体   中英

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

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM