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

No `Podfile' found in the project directory in Flutter project

尽管我有一个 podfile 和一个 podfile.lock,但我一直收到在项目目录中找不到“Podfile”的错误。我 运行 flutter clean、flutter pub get、pod init、flutter build iOS 仍然收到相同的错误消息。我尝试删除 pod 文件,然后 运行ning 命令 sumo gem install cocoapod,pod install,然后 flutter build iOS 并仍然保持 运行ning 进入同样的错误。

将您的工作目录更改为 ios:

   cd ios

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