在 Flutter 项目的项目目录中找不到 `Podfile'

问题描述

即使我有一个 podfile 和一个 podfile.lock,我仍然在项目目录中发现没有“Podfile”错误。我已经运行过 Flutter clean、Flutter pub get、pod init、Flutter build iOS,但仍然收到相同的错误消息。我已经尝试删除 pod 文件,然后运行命令 sumo gem install cocoapod,pod install,然后 Flutter build iOS 并且仍然遇到相同的错误

enter code here

解决方法

使用以下命令将您的工作目录更改为 ios:

   cd ios

然后运行你喜欢的任何 pod 命令