When i do Build -> Flutter -> Build APK in android studio for flutter application, i get the error like "Target file "lib\main.dart" not found.", although i'm able to run application because i have changed the test/widget_test.dart file.
I have changed the main file to routes.dart file which is in the lib folder, so how to solve this error?
Thanks in advance.
When i run command "flutter build apk --target=lib/routes.dart", I get error like this:
The default entry point is main.dart Since there is no main.dart file in your /lib directory you have to specify the entry point. Run the command to build with target option:
flutter build apk --target=lib/routes.dart
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.