XurajB
XurajB

Reputation: 840

Flutter dependencies not working

I am trying to get the tutorial project startup_namer running. I am getting following error after I added english_words dependency on pubspec.yaml

Resolving dependencies...
The Flutter SDK is not available.
Flutter users should run `flutter packages get` instead of `pub get`.

Any idea on how to resolve this? I followed Google getting started documentation but didn't work out for me :(

Upvotes: 1

Views: 10386

Answers (3)

Affan Khan
Affan Khan

Reputation: 39

You can check this link to get the Flutter SDK installed on your machine. If you already have the SDK and want to install the dependencies in pubspec.yaml, run this command in the project's root folder:

flutter packages get

Upvotes: 1

Günter Zöchbauer
Günter Zöchbauer

Reputation: 658235

If you get this error message in Android Studio then you probably don't have the Flutter plugin installed.

I just could reproduce that and for example opening the pubspec.yaml asked me to install the plugin and then the error was fixed. You can also install it manually using the preferences.

Upvotes: 0

SABDAR SHAIK
SABDAR SHAIK

Reputation: 671

Run this command in terminal/Command Prompt

flutter doctor 

It automatically installs the missing dependencies or download the flutter sdk if necessary

if already install still problem exists run

flutter upgrade

Upvotes: 5

Related Questions