Please don't mark as a duplicate. I have tried to read this Flutter : Target file "lib/main.dart" not found but I have found no answer, because what I ask will be little different
so I have this error when I run my Flutter App through the Android project (from Android Studio), I mean for some reason I did not run the project through the Flutter project (not from VS Code). I have no issue If run my Flutter app through VS Code
this is the error
Error: Error when reading 'lib/main.dart': No such file or directory import 'package:mobile/main.dart' as entrypoint
so basically the Android Studio can't find the main.dart
.
I implement Flavor on my Flutter, so I have several main functions such as main_production.dart
, main_staging.dart
and main_development.dart
instead of normal main.dart
. thats why the system can't find the entry point.
In iOS Xcode, I can set the main entry point through Flutter Target like this
but now I am confused, how to connect my Android project to the several main function (my dart files)