Flutter-intellij: Plugin should use flutter packages get instead of pub get

Created on 31 Oct 2016  路  19Comments  路  Source: flutter/flutter-intellij

When editing the pubspec file, intelliJ tries to run pub get to update deps, and by doing so, the following error gets output:

Resolving dependencies...
The Flutter SDK is not available.
Depended on by:
- flutter_sample

Instead of running pub get, it should run flutter packages get / upgrade

bug dart plugin

All 19 comments

Thanks for the report! Could you check what version of the Dart plugin your have? It should be fixed as of plugin version 162.2233.

It says v.0.1.4 here. I don't know how to get the full build number.

Oh sorry, I mean what version is the _Dart_ plugin? (That looks like the right Flutter plugin.)

163.6512.13

Well, that looks good...

What does your Dart SDK path look like? (Preferences>Languages & Frameworks>Dart)?

For example, here's mine:

screen shot 2016-10-31 at 4 33 06 pm

image

Hmmm, thanks. That looks good too.

@alexander-doroshko: any thoughts?

I am experiencing the same problem, though it was working fine a few days ago.

I did a flutter upgrade but that did not help either.
Checked updates for IDEAJ, none left.
Repair cache neither.

I have this notice though:
The Dart SDK for this module is not the same as Flutter's. Setting Dart to use the Flutter vended SDK is strongly recommended.
I changed it as shown above - and that FIXED it in _my_ case.

Flutter's Dart SDK was 1.21.0-dev or something like that.
IDEAJ Dart SDK was at 1.20.0 stable.

Thanks for chiming in @RdeWilde!

That actually exactly what I'd expect. I was hoping that @Pacane had a similar misalignment but looking at the screenshots suggests that the SDK setting is correct.

I am experiencing the same problem, though it was working fine a few days ago.

Regarding this, are you aware of having _changed_ your SDK settings in the meantime? (Between when it worked and when it broke?)

@pq Not aware, but I've been experimenting a lot, so may have been any upgrade or whatsoever.

I'm having the same issue. I have the same issue when I run pub get from the command line though.

Pointing the intellij dart plugin to use flutters sdk seems to have resolved this for me.

@pq I'll be reminding every day that my pull request fixes the issue of diverged Dart and Flutter SDKs. :)
With it applied you may completely remove SdkConfigurationNotificationProvider, it won't be ever triggered any more.

For IntelliJ IDEA 2016.3 EAP minimal Dart plugin version that does 'pub get' correctly for Flutter is 163.6957.3, @Pacane please update the IDE, you'll get the updated plugin as well.

It's effectively fixed after updating the dart plugin. Thanks!

Thanks @Pacane!

Last question: how dependent on using the EAP are you?

Well a lot I guess, since I've been using EAP without license for 2 years now, lol.

Ha! OK, that's great to know thanks!

Thanks @RdeWilde , flutter upgrade worked for me.

Was this page helpful?
0 / 5 - 0 ratings