美文网首页
flutter配置出错- CocoaPods installed

flutter配置出错- CocoaPods installed

作者: NSlog先生 | 来源:发表于2020-05-13 17:29 被阅读0次

    执行flutter doctor出现Warning: CocoaPods installed but not initialized 问题,然后提示我们去执行: sudo gem install cocoapods

    安装cocoapods过程失败,发现原因是:
    Unable to download data from https://gems.ruby-china.org/ - bad response Not Found 404

    解决方法:
    一、首先查看一下自己的ruby,看是不是 https://gems.ruby-china.com/
    gem sources -l

    二、如果不是 https://gems.ruby-china.com/ 的源的话,就添加新源,卸载旧源;
    gem sources --add https://gems.ruby-china.com/ --remove https://gems.ruby-china.org/

    三、再次查看自己的ruby,看是否替换成功。如果显示是https://gems.ruby-china.com/则说明替换成功。
    gem sources -l

    四、重新执行。
    sudo gem install cocoapods

    相关文章

      网友评论

          本文标题:flutter配置出错- CocoaPods installed

          本文链接:https://www.haomeiwen.com/subject/jvconhtx.html