CocoaPods找不到与"Moya"广告连播兼容的版本. [英] CocoaPods could not find compatible versions for pod "Moya"

查看:83
本文介绍了CocoaPods找不到与"Moya"广告连播兼容的版本.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用swift 4.2的新项目位于 podFile 以下:

My new project using swift 4.2 has below podFile:

pod 'Moya', '12.0.1'
pod 'SwiftyJSON', '4.0'
pod 'Moya-SwiftyJSONMapper'

使用 pod install --verbose 进行安装会显示错误:

Intalling using pod install --verbose shows error:

[!] CocoaPods找不到Pod"Moya"的兼容版本:在Podfile中:莫亚(= 12.0.1)

[!] CocoaPods could not find compatible versions for pod "Moya": In Podfile: Moya (= 12.0.1)

    Moya-SwiftyJSONMapper was resolved to 1.0.0, which depends on
      Moya-SwiftyJSONMapper/Core (= 1.0.0) was resolved to 1.0.0, which depends on
        Moya (~> 6.0.0)

CocoaPods could not find compatible versions for pod "SwiftyJSON":
  In Podfile:
    Moya-SwiftyJSONMapper was resolved to 1.0.3, which depends on
      Moya-SwiftyJSONMapper/Core (= 1.0.3) was resolved to 1.0.3, which depends on
        SwiftyJSON (~> 2.3.2)

    SwiftyJSON (= 4.0)

推荐答案

您的pod版本彼此不兼容,此 Podfile 无法正常工作.

Your pod version are not compatible with each other, this Podfile won't work.

但是您可以修复它.

但是您必须检查您的吊舱的哪些吊舱规格才能做到这一点:

But you have to check what podspecs of your pods to do this:

Moya-SwiftyJSONMapper的:此广告连播是"3.0.0" ,它取决于 Moya ,版本 10.x 和任何版本的 SwiftyJSON .

Moya-SwiftyJSONMapper: latest version of this pod is "3.0.0", and it depends on Moya, version 10.x and any version of SwiftyJSON.

因此您的 SwiftyJSON 的版本 4.0 可以.

但是您已指定要安装 Moya 版本 12.0.1 ,该版本不是 10.x 版本之一,因此不兼容.

But you've specified that you want to install Moya version 12.0.1, which is not one of the 10.x version, so it is incompatible.

因此,您必须摆脱版本 12.0.1 的要求,才能使其全部正常工作.

So you have to get rid of version 12.0.1 requirement, to make it all work.

pod 'Moya', '~> 10.0'

或者只是

pod 'Moya'


而且,我认为最好在第一次安装 pod 之前先指定未指定版本的Podfile.并且只有在安装了自动解析的Pod组合之后,您才应该冻结版本要求.


And, I think it's better to have Podfile with no version specified before first pod install. And only after auto-resolved combination of pods is installed you should freeze version requirements.

这篇关于CocoaPods找不到与"Moya"广告连播兼容的版本.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆