So I created a Flutter project in IntelliJ Idea Community Edition on machine A and then uploaded the whole project on GitHub. Now I cloned/checked out from GitHub in the same IDE on machine B, performed the following:

  • flutter packages get
  • flutter upgrade
  • Set up the dart path and all other prerequisites

But, I am still unable to run the flutter project from IDE. I mean I can't even press the "Run" button.

Unable to press the run button

Where did I go wrong?

You can try performing the same steps as I did. it if you want. Here's the Git repository code

Edit I can run the same project via terminal.

[Update] As requested by Günter Zöchbauer in the comment log, here's the logs for flutter doctor -v

BoringFlutterProject$ flutter doctor -v
[✓] Flutter (Channel dev, v0.5.8, on Linux, locale en_IN)
    • Flutter version 0.5.8 at /home/daksh/flutter
    • Framework revision e4b989bf3d (8 days ago), 2018-08-09 09:45:44 -0700
    • Engine revision 3777931801
    • Dart version 2.0.0-dev.69.5.flutter-eab492385c

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /home/daksh/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /home/daksh/Android/Sdk
    • Java binary at: /home/daksh/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.1)
    • Android Studio at /home/daksh/android-studio
    • Flutter plugin version 25.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.1)
    • IntelliJ at /home/daksh/Downloads/idea-IC-181.5281.24
    • Flutter plugin version 25.0.2
    • Dart plugin version 181.4892.1

[✓] VS Code (version 1.26.0)
    • VS Code at /usr/share/code
    • Flutter extension version 2.17.1

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

I posted this question because I'm sure many of us will face the same problem, just like we used to face some issues in AndroidStudio back then


Solution 1: Moti Bartov

I've succeeded to run you project. When I've first open it showed me that it can't find the location for Dart SDK, once I've set the location of the flutter sdk as explained here:

Dart SDK is not configured

it automatically update the location of the Dart SDK, then I've had to run get dependencies, then it run.


Solution 2: Marc Steffens

It is an Android Studio issue. The IDE doesn't apply the flutter SDK location for every new project you clone. The workaround is to open the cloned project go to File>Settings(Ctrl+Alt+S). In 'Languages & Frameworks'>Flutter set the SDK path to your Flutter SDK location (e.g. C:\src\flutter). Once you apply the changes and run the 'Packages Get' command the cloned project is fully accessible and understood by Android Studio.


Solution 3: NewbieOne

Too late but pubspec.yaml-> Pub outdated( on top left of Android Studio's screen) -> build on real device solved my problem


Solution 4: Saiful Islam

If you have flutter and Dart plugin installed.

Now the problem is Dart support for this project is disabled now you have to enable it.

Step 1: Go to Settings -> Languages & Frameworks -> Dart

Step 2: Check the "Enable dart support for this project"

Step 3: Set the Dart SDK path to your Dart SDK folder like the picture given bellow

enter image description here

Step 4: Click on Apply

That's all!


Solution 5: mLstudent33

In addition to answer by @Marc Steffens above, to run on Chrome and not an emulator or device, I also had to run "flutter create ." from the project root in the terminal. Note the trailing ".".


Solution 6: speedi33

What helped in my case, was simply removing the .idea folder in the project root.