Fix pub operations for Flutter in the Dart Plugin (was Failure when opening flutter examples)
See original GitHub issueTested with plugin version 0.0.6:
- Open IJ, and do File>Open
- Navigate to
/flutter/examples/hello_world
and hit OK - It prompted that Dart support is not enabled, enable it
- When prompted that “‘Pub get’ has not been run” hit 'Get dependencies"
Fails with:
Working dir: /Users/mit/dev/github/flutter/examples/hello_world
/Users/mit/dev/github/flutter/bin/cache/dart-sdk/bin/pub get
Resolving dependencies...
The Flutter SDK is not available.
Depended on by:
- hello_world
Process finished with exit code 69
Pub should be available there:
$ /Users/mit/dev/github/flutter/bin/cache/dart-sdk/bin/pub --version
Pub 1.20.0-dev.10.1
$
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Fixing a dependencies problem in Flutter. Says build failed ...
I have similar error and after many tries I solved in this way: Update MacOS; Update Xcode and command lines tools; Run flutter...
Read more >Solving problems when pub get fails | Dart Cookbook
First try this; right-click on your project and select Close Folder. Then, restart the editor and open your project again. In many cases,...
Read more >Android Studio and IntelliJ - Flutter documentation
Open preferences (Android Studio > Check for Updates on macOS, Help > Check for Updates on Linux). If dart or flutter are listed,...
Read more >pspdfkit_flutter 2.0.0 | Flutter Package - Pub.dev
Let's create a simple app that integrates PSPDFKit and uses the Flutter pspdfkit plugin. Run flutter create --org com.example.myapp myapp . Open myapp/pubspec....
Read more >Linter rules - Dart
AVOID using web libraries, dart:html , dart:js and dart:js_util in Flutter packages that are not web plugins. These libraries are not supported outside...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is something we’ll need to handle. The way those pubspecs are written (https://github.com/flutter/flutter/blob/master/examples/hello_world/pubspec.yaml#L5), you can’t use
pub get
orpub upgrade
with them (which IntelliJ is doing). You need to runflutter packages get
andflutter packages upgrade
.@mit-mit Make sure your Dart plugin version is 162.2485.