I create a simple Web application but when I want to run it I got this message in "Tools Output":
Could not find a file named"pubspec.yaml"in"/home/reza/.pubcache/hosted/pub.dartlang.org/browser-0.10.0+2".
How can I fix this problem?
I use Ubuntu 14.04LTS 64bit and Dart Editor 1.7.2
yaml file, often referred to as the pubspec. A basic pubspec is generated when you create a new Flutter project. It's located at the top of the project tree and contains metadata about the project that the Dart and Flutter tooling needs to know.
You can go to the pubspec. yaml file and add dependencies ,under dependencies and then packages get will do the work. or you can run flutter pub get in the terminal.
lock file lets you test your package against the latest compatible versions of its dependencies. For application packages, we recommend that you commit the pubspec.
If you are running Windows as your OS, you can find the packages under the folder that you installed your Flutter SDK to when setting up Android Studio. In my case - using Windows 10 - the path is as follows, where C:\ is my primary harddrive and flutter\ the folder containing the Flutter SDK...
This has happened to me several times:
What's ultimately solved things for me (OS X) is deleting pub's cache:
sudo rm -Rf /Users/<username>/.pub-cache
Also, delete the packages directory in your project's root:
sudo rm -Rf .packages
Then pub get
again in your project(s), but make sure that you are not operating as root (a whoami
will tell you, and an exit
will get you out of there).
run flutter clean
and then flutter pub get
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With