1

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 :(

2
  • ... you (or your IDE) is running pub get instead of flutter packages get. Run flutter packages get to get your dependencies.
    – Dan Field
    Commented Mar 6, 2018 at 3:52
  • Do you get this from Android Studio or from command line? Commented Mar 6, 2018 at 13:44

3 Answers 3

5

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
0
1

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

0

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.