美文网首页
Cocoa Pod 疑难杂症大杂烩

Cocoa Pod 疑难杂症大杂烩

作者: 木木等你 | 来源:发表于2017-02-06 09:09 被阅读28次

1.Setting up CocoaPods master repo

Setting up CocoaPods master repo 卡住
当pod setup 进入Setting up CocoaPods master repo 等待的时候表示正在下载了,此时你可通过新开一个终端窗口,输入"cd ~/.cocoapods/"命令行跳到cocoapods文件夹内,执行"du -sh *"查看正在下载的文件夹的大小
具体方法:

1.耐心等待
2.$ cd ~/.cocoapods/
3.$ du -sh *

2.None of your spec sources contain a spec satisfying the dependency

图1.png

发现这是个已知的BUG, CocoaPods的版本库是有缓存的, 但在使用pod指令更新版本库时会出现冲突, 导致更新并不能如期完成, 需要手动删除本地缓存, 再进行更新.

具体方法:

$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup

3.in `find_spec_for_exe': can't find gem cocoapods

//问题出现
 ➜  MMAlipayDemo git:(master) ✗ pod init
/Library/Ruby/Site/2.0.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)
    from /Library/Ruby/Site/2.0.0/rubygems.rb:278:in `activate_bin_path'
    from /usr/local/bin/pod:22:in `<main>'

解决方法:

sudo gem uninstall cocoapods
gem install cocoapods

相关文章

网友评论

      本文标题:Cocoa Pod 疑难杂症大杂烩

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