【问题标题】:How to use cocoapods in a flutter project如何在颤振项目中使用 cocoapods
【发布时间】:2021-12-16 06:42:11
【问题描述】:

我一直在尝试使用 Firebase。尝试在IOS模拟器上运行应用程序后,它给出了这个错误

Warning: CocoaPods not installed. Skipping pod install.
  CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
  Without CocoaPods, plugins will not work on iOS or macOS.
  For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods not installed or not in valid state.
Error launching application on iPhone 12 Pro Max.

问题也是我无法运行颤振医生,因为即使它在说找不到颤振命令的路径中,我也徒劳地尝试了所有解决方案。

我继续尝试删除 pod 文件并使用 pod install 重新安装它,一切正常,但仍然无法正常工作。我使用 brew 更新了 cocoapods,因为它没有使用 gem 并且对 ruby​​ 做了同样的事情,但它仍然无法正常工作 我不知道我应该展示哪个项目 任何帮助将不胜感激。

【问题讨论】:

    标签: flutter


    【解决方案1】:

    我经常遇到同样的问题。

    如果在此处找到的解决方案通常对我有用: https://stackoverflow.com/a/64676861/6704033

    解决方案:1

    按照此命令更新您的 pod

    1. flutter clean
    2. pod repo update
    3. 已删除 /ios/Pods//ios/Podfile.lock
    4. 运行pod install

    解决方案:2

    1. 第一个pod repo update
    2. rm -rf Podfile.lock
    3. pod install

    有时重启我的 IDE 也会修复它。

    【讨论】:

    • 这些都不适合我。可能是因为我使用 brew 下载了 cocoapods 吗?
    • @Jimmyjbk 可以尝试用 gem guides.cocoapods.org/using/getting-started.html重新安装它
    • Gem 无法安装扩展。而且flutter命令不起作用
    • @Jimmyjbk 可能先尝试解决这个问题
    • 现在解决了而且我的iOS端没有错误
    猜你喜欢
    • 2019-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-25
    • 1970-01-01
    • 2019-11-17
    • 2020-11-13
    • 1970-01-01
    相关资源
    最近更新 更多