Dart報錯彙總

1.Dart_LoadScriptFromKernel: The binary program does not contain ‘main’
在這裏插入圖片描述
解決方案:保存一下(Ctrl+S),然後在code run,就OK了。

Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.

在這裏插入圖片描述
打開項目總文件夾運行,不要打開上一級目錄運行
D:\Projects\flutter\Demo\flutter_app> flutter run( 項目名)這裏打開
D:\Projects\flutter\Demo> flutter run 不要在這裏打開

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章