Flutter 填坑记录

问题1: 安装依赖为空

执行: pod install 

出现以下提示:
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.
[!] The Podfile does not contain any dependencies. 

解决:
直接删除podfile 和 podfile.lock,然后重新flutter run ,问题解决
参考:https://github.com/CocoaPods/CocoaPods/issues/6583

image.png

问题2 无法启动ios模拟器

启动模拟器时,出现提示

Unable to boot the Simulator.

解决方案:
删除开发者缓存,然后重新启动模拟器。
参考:https://stackoverflow.com/questions/72229589/flutter-xcode-error-unable-to-boot-the-simulator

image.png

问题3: Flutter/Flutter.h' file not found问题

flutter run的时候,出现以下报错

image.png

解决:
删除ios目录,运行flutter create . 重新生成ios目录
参考:gpt4o,这家伙有时候还挺靠谱
image.png

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容