Flutter users should run `flutter packages get` instead of `pub get`

Viewed 8379

I got a flutter project to complete from my friend.

I am using Android Studio(AS) as editor. I have installed flutter and dart plugins in AS. Now, I have imported the flutter project by selecting option at start of AS import AS project. Then it I don't know why it shown me error message to setup Dart SDK(Q1: my first question is why it is giving error I already have dart plugin). Somehow I managed to get Dart from this link and gave path to till dart-sdk folder as seen in screenshot enter image description here And now I am stuck on this error:

Because xxo_tag_xxxls depends on flutter_test any from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.

Flutter users should run flutter packages get instead of pub get.

enter image description here

3 Answers

you should configure in addition to the Dart language SDK, pointing to the Flutter SDK ('C:\src\flutter') within your Andoid Studio project. Go to the top menu 'Tools > Flutter > Flutter Clean' and the IDE will ask you to configure what is missing.

in mac if you are using android studio, go to android studio at the top left, preferences, flutter, then add path to sdk

you have to configure in addition to the Dart language SDK, pointing to the Flutter SDK ('C:\src\flutter') within your Andoid Studio project. Go to the top menu 'Tools > Flutter >flutter package get and click on it ,it will find the things those are missing.

Related