问题描述:自己制作了一个组件库放在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
网友评论