79076634

Date: 2024-10-11 02:26:30
Score: 1
Natty:
Report link

Having recently experienced this swapping main.dart files in Android Studio (Ladybug), I gratefully concur with ketan-ramteke and salihgueler . The only difference for me was that there was no Flutter-iconed main.dart. So, I created it, entering 'Edit Configurations...', and under Flutter, clicking the '+', completing the Name and Data entrypoint fields with name of location of the newly-minted main.dart, clicking Apply and OK. Then my new main.dart properly appeared, Flutter-iconized, from the configurations menu to be run as Flutter, in lieu of the Dart config it had been. No more errors.

Android Studio Run/Debug Configurations Menu

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: J Michael