首页 > 解决方案 > 刚刚把新版本的pod推送到cocoapods,但是无法安装

问题描述

因此,我刚刚成功上传了我的 pod ( ) 的新版本 (1.0.1) pod trunk push MonarchRouter.podspec,但在尝试上传时收到此消息pod install

CocoaPods could not find compatible versions for pod "MonarchRouter":  
  In Podfile:
    MonarchRouter (~> 1.0.1)

None of your spec sources contain a spec satisfying the dependency: `MonarchRouter (~> 1.0.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.

我很确定它不是上述的。

标签: cocoapods

解决方案


你应该清理 cocoapods 缓存。

rm -rf ~/Library/Caches/CocoaPods

在 github 上一个不相关的线程中的某个地方找到了答案,只是想把它留在这里。


推荐阅读