question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntelliJ opens example project without Flutter module

See original GitHub issue

When 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.

  1. There should be a a way, to activate Flutter Support in the IDE
  2. 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:

  1. Get the hello_world example:

https://github.com/flutter/flutter/tree/b9bff6a912c62c9dae5eddbaef80927655b769d7/examples/hello_world

  1. Open the example project in IntelliJ

  2. Click on “Get dependencies” in the “‘Pub get’ has not been run” message

  3. 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
  1. Close IntelliJ and create the file flutter.yaml with this content:
name: hello_world
uses-material-design: true
  1. Restart IntelliJ with the hello_world example.

  2. The message “‘hello_world’ is not a Flutter module, devide debugging is not fully supported.” appear.

  3. Click on Change module type to Flutter and reload project

  4. 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:closed
  • Created 7 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
jsiedentopcommented, Nov 22, 2016

@mit-mit, this is correct.

0reactions
pqcommented, Jan 23, 2017

Closing in favor of #316 which addresses the issue of Flutter projects missing IDEA metadata.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import Flutter module together with it's Android Gradle ...
Run configuration for Flutter app works. Exit and open IntelljI IDEA then open project myproject again. What is the expected result? Reopen project...
Read more >
IntelliJ IDEA - Project structure settings - JetBrains
These settings include SDKs, project compiler output paths, and libraries that are available for all modules within a project. or select File |...
Read more >
Dart | IntelliJ IDEA Documentation - JetBrains
With IntelliJ IDEA, you can develop, run, and debug Dart web and command-line applications. IntelliJ IDEA helps you providing code completion, error and ......
Read more >
Add frameworks (facets) | IntelliJ IDEA Documentation
In the Project tool window Alt+1 , right-click the module to which you want to add a facet, and select Add Framework Support....
Read more >
Modules | IntelliJ IDEA Documentation - JetBrains
Open the Project Structure dialog Ctrl+Alt+Shift+S and click Modules. Select the modules you want to group, open the context menu, and click ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found