经常会遇到
运行模拟器跑着跑着再重新运行的时候报错
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
我的解决方案是在VSCode的终端输入
flutter clean
然后重新运行就好了
哦 还有注意你的.dart文件中注释// import 'dart:html';
有时候某次的修改main.dart代码有可能导致Android studio再次自动导入 import dart:html
导致再次编译失败,只需要再次注释或者删除即可