cocoapod错误汇总

1.   The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.


解决方法:根据提示重新pod install


2. 

CocoaPods could not find compatible versions for pod "ZLCategory":

  In snapshot (Podfile.lock):

    ZLCategory (= 0.1.1)

  In Podfile:

    ZLCategory

None of your spec sources contain a spec satisfying the dependencies: `ZLCategory, ZLCategory (= 0.1.1)`.

You have either:

 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.

 * mistyped the name or version.

 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default


cocoapod错误汇总_第1张图片

使用pod update命令


3.

/Users/zhaoliangchen/Desktop/anxin/Pods/Pods/Target Support Files/Pods-anxin/Pods-anxin.debug.xcconfig: unable to open file (in target "anxin" in project "anxin") (in target 'anxin')



cocoapod错误汇总_第2张图片


解决方法:


选择正确的路径


4. pod update时候显示详细信息,并跳过Updating spec repo `master`

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


5. pod update 的时候 Cloning into 'master' 速度慢

使用清华镜像

https://mirror.tuna.tsinghua.edu.cn/help/CocoaPods/

$ cd~/.cocoapods/repos 

$ pod repo remove master

//清华的镜像

$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master

//coding的镜像

$ git clone https://git.coding.net/hging/Specs.git master

最后进入自己的工程,在自己工程的podFile第一行加上:

source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'


6. 取消代理

终端输入 git config --global --unset http.proxy

取消代理.

你可能感兴趣的:(cocoapod错误汇总)