CocoPods was not able to update the 'master' repo. 效率解决方法。

在更新项目时,使用CocoPod 更新时 会有以下报错。

CocoPods was not able to update the 'master' repo. If this is an unexpected issue and persists you can inspect it running 'pod repo update —verbose'

翻译了一下。就是需要更新本地的资源库 直接使用  pod repo update —verbose 更新。

但是 不一定 使用 pod repo update —verbose 就能更新到本地的资源库。

如果使用 pod repo update —verbose 还是无法解决上面的报错 那么可以尝试使用下面的方法。

先删除全局的缓存:

$ sudo rm -fr ~/Library/Caches/CocoaPods/

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

把当前 Pods 目录清空:
$ sudo rm -fr Pods/

然后,重新安装cocoa-pods

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

$ pod setup

慢慢等吧,看你网速了,这里由于是国外的资源,下载会非常慢。


这里提供两种方法。

方法一:慢慢等待 等到系统自己下载完为止。

方法二:找个同事把最新的master文件夹拷贝给你。

CocoPods was not able to update the 'master' repo. 效率解决方法。

把本地的master文件夹删除 替换成拉取过来的master文件夹。

然后在终端使用 Pod  repo update 命令 需要少许时间等待就行了。

 CocoPods was not able to update the 'master' repo. 效率解决方法。