简体   繁体   中英

Target file "lib\main.dart" not found. flutter

Even I have the file in lib/ folder flutter gives me error

Here is my file

主要飞镖位置 C:\SRC\flutter\packages\flutter_tools>flutter run Target file "lib\main.dart" not found.

Edit:

here is my configuration

在此处输入图像描述

I have looked to this topic Getting error like "Target file "lib\main.dart" not found." whlie building APK in flutter

But this situation is different from mine.


This is the error because of the main execution starts searching main file, but can't find it.

Go to Edit Configurations...
在此处输入图像描述
Set here main.dart file as dart entry point here and save it...
在此处输入图像描述

Run following command
flutter run -t lib/main.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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM