您当前的位置: 首页 >  ios

xiangzhihong8

暂无认证

  • 1浏览

    0关注

    1324博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

关于iOS的CocoaPods版本冲突的解决方案

xiangzhihong8 发布时间:2022-09-15 19:49:29 ,浏览量:1

最近,在运行Flutter项目的时候,报了如下一个错误:

You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it

意思是,安装了CocoaPods,但它不工作。如果安装CocoaPods的Ruby版本与用于调用它的版本不同,就会发生这种情况。对于上面这个问题,我们只需要下面几步就可以解决: 1,首先查看CocoaPods的版本。

pod --version

如果没有安装,使用下面的命令安装:

sudo gem install cocoapods

如果是Flutter,还可以能会报如下错误:If with sudo its failing,First download and install brew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)",此时需要运行如下命令:

 brew install cocoapods
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
关注
打赏
1482932726
查看更多评论
立即登录/注册

微信扫码登录

0.0841s