问题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