In Flutter when I write Command "flutter build apk" I have error " Error: No pubspec.yaml file found - flutter

Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.
Please note that I have executed the same project previously more than once.

You are in the wrong folder in the command prompt..navigate to the root directory of your project in which the pubspec.yaml is placed.

Related

When i press run flutter it is show "Error: No pubspec.yaml file found. This command should be run from the root of your Flutter project. :"

When I press run flutter it is show
Error: No pubspec.yaml file found. This command should be run from the root of your Flutter project.
the Error image
flutter doctor
How can I fix it?
The ua is not the correct directory for your project. You need to change your working directory with:
cd ali
Then, you can flutter run.

Request a solution to Error: File pubspec.yaml could not be found

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

No pubspec.yaml file found. in flutter

I tried to build the project from vs code terminal but it just threw an error
According to the image, there is another folder inside of flutter-quizstar-master-step, therefore execute:
cd flutter-quizstar-master
then
flutter build apk

pub get failed (66; Could not find a file named "pubspec.yaml" in "C:\Windows\System32"

fatal: not a git repository (or any of the parent directories): .git Could not find a file named "pubspec.yaml" in "C:\Windows\System32". pub get failed (66; Could not find a file named "pubspec.yaml" in "C:\Windows\System32".)
hi everyone
I got this error message every time when I tried to create a flutter project by an android studio or by cmd
I checked flutter doctor command and appear no problems about flutter installation
so any advice about this problem?
[error message when I used android studio 1
flutter doctor message
You can try below steps:
First, you reboot(restart) your PC.
Before opening anything, you delete your flutter folder.
Unzipped a new flutter installation into the same directory.
Inside your project directory You run flutter packages get
Then open the IDE and everything will be working.
Refer flutter issue for more information.

Error in terminal while running flutter pub get: Response:

I am new to flutter and SO, I tried this Flutter force higher package dependency version,
My code was
dependencies:
intl: ^0.15.0
I replaced it with
dependency_overrides:
intl: ^0.16.0
But I still get this error
$ flutter pub get
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.
This isn't a pubspec issue. You're simply executing the command from the wrong directory.
cd into the directory where your flutter project files are. That will be the folder that contains other folders like, build, android, ios, lib along with the pubspec.yaml file. Run flutter pub get from there.
Go to the root of your project, where the lib and other directories exist. Then run the command. The best is to use the terminal of your code editor as the path would be same as root of your project in there.