- 今天升级 CocoaPods 到 1.8.4 版本,遇到了
CDN: trunk
报错
图2.png
解决方案:
- podfile文件中指定source源为master:在podfile顶部加入
source 'https://github.com/CocoaPods/Specs.git'
podfile文件中一定要指定master
源,因为现在默认是trunk
源 - 然后执行:
pod repo list 查看一下源列表
pod repo remove trunk 移除trunk源
该问题参考资料:
- 解决了CDN: trunk问题,又出现了 CocoaPods could not find compatible versions for pod "MJRefresh": In snapshot (Podfile.lock):
localhost:ProjectCtl xsh-ios$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "MJRefresh":
In snapshot (Podfile.lock):
MJRefresh (= 3.3.1)
In Podfile:
MJRefresh
None of your spec sources contain a spec satisfying the dependencies: `MJRefresh, MJRefresh (= 3.3.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.
解决方法:
把Podfile.lock文件删除,重新pod install一下就好了!
如果还不行把.xcworkspace也删了。
网友评论