![](/img/trans.png)
[英]Getting error like “Target file ”lib\main.dart“ not found.” whlie building APK in flutter
[英]Flutter: I have changed the Dart entrypoint to Login.dart , while building apks error shows that lib\main.dart not found
C:\flutter\flutter_windows_v1.9.1+hotfix.2-stable\flutter\bin\flutter.bat --no-color build apk
Target file "lib\main.dart" not found.
Process finished with exit code 1
您可以像這樣設置入口點:
flutter run --target=lib/Login.dart
flutter build apk --target=lib/Login.dart
本文向您展示如何設置 IDE (VSCode/AS) 以構建另一個目標文件。
我認為您不應該更改條目文件,您可以隨時使用 main.dart 沒有問題,然后在那里設置條目 class。 這不會阻止您的應用程序運行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.