Emulator field grayed out "not applicable for the main.dart configuration"

Hello,

I have created my first flutter project. I want to run it using the emulator, but it is grayed out. The message “not applicable for the main.dart configuration” appears.
I am running ubuntu 18.04
Here is some output from flutter doctor -v .
[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Linux, locale en_IL)
• Flutter version 1.9.1+hotfix.2 at /home/r/flutter
• Framework revision 2d2a1ffec9 (3 weeks ago), 2019-09-06 18:39:49 -0700
• Engine revision b863200c37
• Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /home/r/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /home/r/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Android Studio (version 3.5)
• Android Studio at /home/r/android-studio
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] Connected device
! No devices available

! Doctor found issues in 1 category.!

+1

The same problem on my Mac.

The only reason I can think of why it’s happening is that you have not started your emulator.

Had you done that you would not see

[!] Connected device
! No devices available

Message. Please confirm if this is the same issue.

2 Likes

I agree with @ashish173 . First start your emulator and then try to run the Application. Also, make sure that your Flutter Plugin for Android Studio is installed correctly.

My Emulator is Running.

Still grayed out.
Trying to Run “A20 API 29”

image

Same Message.
Latest API 29… Same message with 28…
Flutter Doctor says All okay:
Event Log says Unable to Connect on Port 5037

please see my reply.

From github issues comment

The way I fixed it was clicking: File -> Project Structure -> Module
And then add the root folder of the project, then it will detect that its a flutter app again, and then build and work again.

2 Likes

GO TO PROJECT STRUCTURE>PROJECT>NOSDK

Change NOSDK to the latest ANDROID API PLATFORM

THEN GO TO MODULE DO THE SAME

2 Likes