[!] CocoaPods could not find compatible versions for pod "xxx": In Podfile:

问题描述:自己制作了一个组件库放在github,github上已经存在的库版本有0.1.0、0.1.1、0.1.2,接着自己新添加了一些内容然后又提交了一个0.1.3,然后我执行pod search 命令是可以搜索到最新的0.1.3版本的组件库,可是在执行pod install的时候报错如下。参考链接

[!] CocoaPods could not find compatible versions for pod "JCZJTest":

  In Podfile:

    JCZJTest (~> 0.1.3)

None of your spec sources contain a spec satisfying the dependency: `JCZJTest (~> 0.1.3)`.

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.
  • 解决方案:
    1.终端cd到项目有Podfile的路径下,执行下边的命令

rm Podfile.lock

2.接着执行下边的命令

pod install --repo-update

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容