我刚刚从 GitHub 下载了一个项目
(https://github.com/pichillilorenzo/flutter_browser_app)。 当我使用 flutter run -d chrome --release 运行它时,它显示了一个错误
https://drive.google.com/file/d/1cXnLmX-gXeOiI56Cv4oeVcyVFdDlqd02/view?usp=sharing
(我试过这个 "$ flutter build web" is throwing the error "Missing index.html"? 但没用)
我可以在 chrome 中运行其他项目
flutter doctor 的输出
https://drive.google.com/file/d/1cXnLmX-gXeOiI56Cv4oeVcyVFdDlqd02/view?usp=sharing
简而言之,我只想在 chrome 上运行这个项目。
答案 0 :(得分:0)
你可以试试这个方法,它很有效:
这样,新项目就已经为网络配置好了,可以运行了。
答案 1 :(得分:0)
cd 回到项目所在的父目录。
运行 flutter create folder-name
这将修复当前项目并添加任何丢失的文件。您可能需要打开 pubspec.yaml 文件,然后执行 pud get 和 pub upgrade 才能让一切恢复正常。