简体   繁体   中英

Cannot find "pubspec.yaml"

I have cloned a flutter project from GitHub. On running pub get I get this error every time.

Error msg

File Structure

These are the screenshot of file

Please guide me to resolve this issue

As you have mentioned that you have cloned this repo, it's clear that after cloning you haven't changed the name of the project and other details according to your project.

That's the reason Flutter is not able to find the pubspec.yaml file. Change the project name and other details according to what details you had given while creating the project on Android Studio for example: you have named your project mobile but in pubspec.yaml it's name is given frappe_app.

It's unclear what your file structure is. But what it looks like is that your "pubspec.yaml" file is inside "test" folder, while you're running the "flutter pub get" command inside the "mobile" folder. Try moving that file from inside of "test" folder to the "mobile" folder; where your "lib", "ios", "android" folders are. Then only "flutter pub get" command will work.

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