最近添加三方库,突然就不行了,而且加载也很慢,自己上网查了很多资料,不全,
导致了我每次都要修改更新库,今天才弄好,我也整理了一下。
开始输入 pod install的时候
提示Unable to find a specification for `x'x'x'x`
好吧我就照着网友的提示,删掉master 重新添加国内地址
pod repo remove master pod repo add master https://gitcafe.com/akuandev/Specs.git好吧我错了 报错,
To setup the master specs repo, please run 'pod setup'
好吧我又去查一查
git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
找到了 解决方法
很顺利的更新了库,然后来吧 继续 pod install
我擦 可以了,不错。
然而第二次使用的时候,pod install 就开始抽风了
提示Unable to find a specification for `x'x'x'x`
我擦,捣鼓捣鼓很长时间,反复这样,很费时间,好吧我又继续查,好吧,想想把search表删了重新试一试,跟着思路继续
rm ~/Library/Caches/CocoaPods/search_index.json
OK 很不错 ,貌似可以了。
走了很多弯路,希望能帮助你们,少走弯路。
还有就是现在最好使用 pod install --verbose --no-repo-update 就不会升级仓库,效率会高一点。
cd ~/.cocoapods里;
到该目录里,用du -sh *命令来查看文件大小,