美文网首页
Flutter:Could not build the appl

Flutter:Could not build the appl

作者: 像羽毛那样轻 | 来源:发表于2023-03-26 21:25 被阅读0次

Could not build the application for the simulator

Error launching application on iPhone 11.

解决办法:在终端清理 Flutter 缓存,并运行,具体的命令如下:

flutter clean

flutter run

如果以上办法还不能解决,可以删除 Xcode 的缓存,对应路径为: ~/Library/Developer/Xcode/DerivedData

这个错误是模糊的,建议在 Xcode 或者 Android Studio 中运行项目,会报出具体的原因,此处是用 Xcode 运行项目报错的内容,是因为没有找到 dart.html ,这个主要是库导入的有问题,请检查自己的库,我是因为页面多导入了dart:html导致的问题。

Xcode报的错误 系统自己添加了

找到 pubspec.yaml,注释掉 dependencies 中 flutter 的依赖就可以了 ,这是为了避免在Flutter Web 插件包之外使用纯web库。

相关文章

网友评论

      本文标题:Flutter:Could not build the appl

      本文链接:https://www.haomeiwen.com/subject/plrardtx.html