博客> cocoapods 2018-09-13 倒入第三方后出现的问题
cocoapods 2018-09-13 倒入第三方后出现的问题
2019-10-23 11:48 评论:0 阅读:3714 哭泣的訫
cocoapods 错误 用不了

新遇到的问题,在cocoapods 第三方类库导入明明已经导入成功了,偏偏在最后出现了错误,导致工程无发使用第三方类库,报的错误如下:

错误

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=Malformed+version+number+string+&type=Issues

If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

[!] Smart quotes were detected and ignored in your Podfile. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

[!] 'RongCloudIM' uses the unencrypted http protocol to transfer the Pod. Please be sure you're in a safe network with only trusted hosts in there. Please reach out to the library author to notify them of this security issue.

一、首先查看一下自己的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

四、重新初始化安装Pod。

sudo gem install -n /usr/local/bin cocoapods

五、成功之后查看一下版本有无,现在最新的是 1.5.3 版本。

pod --version

六、如果没什么问题的话吗,就cd到自己的工程目录下进行更新第三方库

pod install --verbose --no-repo-update

到这:问题就完美解决了,有帮助的话,请在下面点个赞,

收藏
1
sina weixin mail 回到顶部