Reputation: 79776
I dowloaded a Flutter sample code for Catalog from git, which showing me a warning,
'package get' has not been run
'Pub get' has not been run
What does it mean? How to solve it? Should I ignore this warnings or Update dependencies as suggested with links in warning?
Upvotes: 15
Views: 53511
Reputation: 9
This error is uccered when your flutter sdk and dart sdk werent matched, so by disabling both plugins in android studio and enable only the flutter plugin, this problem will be solved.
Upvotes: 0
Reputation: 41
when clicks on Get Dependencies but doesn't work. All you need to do is:-
in the toolbar
3- congratulations! done does work now :D
Upvotes: 2
Reputation: 4973
For me, it was happening on the local packages in my project, and clicking on Get dependencies was not working.
The reason is that Get dependencies on the banner runs the flutter pub get
on the main root of the project, not that specific package. So the fix would be:
cd package_name
flutter pub get
Upvotes: 1
Reputation: 11
Try setting your Dart entrypoint. Go to File -> Run -> Profile -> Edit Configurations -> New configuration (+ on the top left) -> Flutter and set the Dart entrypoint to your main.dart file. For example:
AndroidStudioProjects/project_foo/lib/main.dart
Then set a device and run the project. The dependencies should resolve automatically.
Upvotes: 1
Reputation: 11
if nothing works even after clicking on Get Dependencies and restarting update your android studio IDE that will work
Upvotes: 1
Reputation: 11
Update your plugins/externals by restarting android studio. It asked for that and then it all worked.
Upvotes: 1
Reputation: 6178
I tried all solution in this post but nothing help even reopen IDE. Finally I have no choice but click the Ignore button:
This is the last way... Maybe it's a bug of IDE.
So take it easy and just click Ignore button when you had execute pub get.
Note: My projects all work well.
Upvotes: 1
Reputation: 151
When I face that error, actually I found out that I am in another subfolder. The solution is really easy to delete an extra folder or just cd that subfolder and run "flutter pub get" command.
...
Sorry for my bad English!
Upvotes: 1
Reputation: 51
This is for anyone who clicks on Get Dependencies
but doesn't work. All you need to do is:
Step 1: Go to terminal and type flutter upgrade
Step 2: Go to File
-> Invalidate Caches/Restart
-> click Restart
Step 3: Now just click Get Dependencies
That will do the job.
Upvotes: 2
Reputation: 1
This is the correct way i am try it , It works normally
To solve this error in the EASIEST WAY follow below steps :
Go to terminal
Then find local tabs
Then click on a '+' sign and type your command.This should solve your error
Upvotes: -1
Reputation: 21
Upvotes: 2
Reputation: 101
Just restart Android Studio or Your IDE, it worked for me also. Or Run flutter upgrade in terminal.
Upvotes: 8
Reputation: 21
Click on the 'Get dependencies' on the banner 'pub get', then the banner will disappear an the dependencies will get downloaded and the errors will disappear. If still the errors remain then restart Android Studio and try. It worked for me.
Upvotes: 1
Reputation: 111
The banner 'Pub get' has not been run
did not disappear even after I clicked Get dependencies
and Upgrade dependencies
.
Then, after I closed Android Studio and opened the same project again, the banner disappeared.
Upvotes: 11
Reputation: 61
Reopen the project if the error does not disappear even after downloading dependences.
Upvotes: 2
Reputation: 277627
Dart is similar to node.
It has a pubspec.yaml
which is the equivalent of package.json
containing your dependencies and stuff.
And you need to download these dependencies, using pub get
. Or on the case of flutter, using flutter packages get
.
This warning is just here to reminds you that your dependencies aren't downloaded
=> Click on Get Dependencies
of the first warning
Upvotes: 23