我正在尝试运行连接到 Firebase 的 flutter 应用程序,但是当我尝试在 iOS 模拟器上运行它时,它会显示这些错误 -
Warning: CocoaPods installed but not initialized. 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 initialize CocoaPods, run: pod setup once to finalize CocoaPods' installation.
然后我执行“pod setup”但随后显示此错误:
Cloning into 'master'...
remote: Enumerating objects: 14707, done.
remote: Counting objects: 100% (14707/14707), done.
remote: Compressing objects: 100% (14117/14117), done.
error: RPC failed; curl 18 transfer closed with outstanding read data
remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
最佳答案
对我来说,这是由于 cocoapods 版本。您可以在您的终端中使用它:
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
此问题的解决方法如下: https://github.com/flutter/flutter/issues/41253
还有这里: https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices
(我使用的是 macOS Catalina JIC)
关于ios - 无法设置 cocoapods。 Cocoapods设置问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57201123/