Not applicable for the "main.dart" configuration

Why new question for same issue?

What is wrong?

  • Using Android Studio 4.0.0 for Mac with latest Flutter+Dart plugins
  • MacOS 10.15.5
  • Created a new Flutter Application project
  • Ensured all values are set (by checking StackOverflow, and here
  • Getting Not applicable for the "main.dart" configuration for a device, and emulator
  • Note no issue when Visual Studio with Flutter plugin

Details

Since I am a new user, can’t upload more than one screenshot in a post.
Hence here is a link to a folder, which holds all screenshots to explore:

Addendum

This is a major setback, and it seems it’s a not a common problem for majority of developers.

Hence I am willing to cooperate and provide any additional details and information for this issue to be resolved ASAP.

2 Likes

@dimitar71 Thanks for the detailed question. I understand many devs are facing this issue, let’s try to resolve this.
First things first, please share the flutter doctor output.

@sakina Please look at provided screenshots, it has all screens, including flutter doctor outputs, and more.

@sakina What I’ve discivered additionally, is although the device is greyed out, you can still use commands from within Terminal, e.g.

flutter run

And then using r and R for hot reload/restart.
So there is a workaround, but the plugin itself does not work as expected (at least on MacOS)

2 Likes

Thanks for this, it will surely help someone.

Hello,

I am unable to launch any AVD other than “sdk gphonex86 arm (mobile)” and when I hover over the AVD I would like to use, it appears as such:

Flutter Doctor does not appear to note any relevant issues:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.4, on Microsoft Windows [Version 10.0.19041.264], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[√] Android Studio (version 4.0)
[!] Connected device
! No devices available

! Doctor found issues in 1 category.

When I attempt to open the AVD I would like to use via the dropdown, I get this error in the Event Log:

Error Opening Emulator
emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature…

Any help would be very much appreciated.

@sakina Any update on the issue? Should we open a ticket with the Flutter plugin team?

Leaving all the information here, which may help to someone else.

I’ve spent some additional time digging and checking other ppl’s ideas.

There are several issues opened with Flutter Intellij (Android Studio) plugin team:

  • #4654
  • #4670
  • #4665
  • #4662
  • #4642

I’ve tried the dev channel build which did not solve anything.

The only solution as of today (June 29, 2020), at least for Mac devs, is installing XCode as mentioned here:

Seems for Windows devs, reverting to an old version will solve the issue, but haven’t tested it myself:

All in all Android Studio plugin as of today is in a bad shape.
It’s annoying when Flutter SDK gets heavily promoted and pushed, and then the day-to-day tools are not helping.
Not to mention there are 446 opened issues with Intellij plugin.

Good luck!

2 Likes

I recently ran into this issue as well.
One possible work around is to use cli to launch the emulator.

Open powershell / terminal in android studio:

flutter emulator
O/P:
2 available emulators:

3.7_FWVGA_slider_API_29 • 3.7 FWVGA slider API 29 • Generic • android
Pixel_3a_XL_API_29 • Pixel 3a XL API 29 • Google • android

flutter emulators --launch 3.7_FWVGA_slider_API_29

Once this is launched, “no device” drop down which is to the right of “main.dart” configuration drop down is populated by launched emulator in the previous step.