IntelliJ opens example project without Flutter module
See original GitHub issueWhen I open one of the flutter examples in IntelliJ (tested with hello_world, hello_service and gallery), the IDE loads the Dart module but no Flutter module.
In the Modul Settings (context menu on the root node in the project tree -> Open Module Settings) Is one problem listed: “Project hello_world: project SDK is not defined”. I did’t find a way to activate the Flutter Module in the IDE.
- There should be a a way, to activate Flutter Support in the IDE
- The IDE should recognize, that the Flutter module needs to be loaded. Maybe update the Flutter plugin or add a flutter.yaml file in the example projects.
Informations to reproduce the issue and a workaround to activate the Flutter support:
- Get the hello_world example:
-
Open the example project in IntelliJ
-
Click on “Get dependencies” in the “‘Pub get’ has not been run” message
-
The following error appear:
Working dir: /Users/jonas/dart/hello_world
/Users/jonas/Library/flutter/bin/cache/dart-sdk/bin/pub get
Resolving dependencies...
The Flutter SDK is not available.
Depended on by:
- hello_services
Process finished with exit code 69
- Close IntelliJ and create the file flutter.yaml with this content:
name: hello_world
uses-material-design: true
-
Restart IntelliJ with the hello_world example.
-
The message “‘hello_world’ is not a Flutter module, devide debugging is not fully supported.” appear.
-
Click on Change module type to Flutter and reload project
-
Run the pub action Get dependencies (Should work fine without error).
Flutter doctor output:
$ flutter doctor
[✓] Flutter (on M.ac OS, channel master)
• Flutter at /Users/jonas/Library/flutter
• Framework revision a0c567f751 (5 hours ago), 2016-11-21 20:17:41
• Engine revision cea5ed2b9b
• Tools Dart version 1.21.0-dev.6.0
[✓] Android toolchain - develop for Android devices (Android SDK 25.0.0)
• Android SDK at /Users/jonas/Library/Android/sdk
• Platform android-25, build-tools 25.0.0
• Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
[✓] iOS toolchain - develop for iOS devices (Xcode 8.1)
• XCode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.1, Build version 8B62
[✓] IntelliJ IDEA Community Edition (version 2016.2.5)
• Dart plugin installed
• Flutter plugin installed
[✓] Connected devices
• SM N9005 • eb53b4f0 • android-arm • Android 5.0 (API 21)
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (7 by maintainers)
Top GitHub Comments
@mit-mit, this is correct.
Closing in favor of #316 which addresses the issue of Flutter projects missing IDEA metadata.