Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change configuration flutter build apk, Target file "lib/main.dart" not found

Tags:

build

flutter

Hey guys how to i changing target flutter build apk cause i getting error target file not found on console:

(base) dendimuhmd@mbp-dendimuhmd makanyuk % flutter build apk --release            
Target file "lib/main.dart" not found.

Folder structure

like image 564
dendi Avatar asked Nov 30 '25 01:11

dendi


1 Answers

You can use -t to change the target.

The main entry-point file of the application, as run on the device. If the "--target" option is omitted, but a file name is provided on the command line, then that is used instead. (defaults to "lib\main.dart")

For your case

flutter build apk  -t .\lib\src\main.dart
like image 65
Yeasin Sheikh Avatar answered Dec 01 '25 15:12

Yeasin Sheikh