简体   繁体   English

CocoaPods找不到“ Moya”吊舱的兼容版本

[英]CocoaPods could not find compatible versions for pod “Moya”

My new project using swift 4.2 has below podFile : 我使用swift 4.2的新项目在podFile下面:

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

Intalling using pod install --verbose shows error: 使用pod install --verbose安装会显示错误:

[!] CocoaPods could not find compatible versions for pod "Moya": In Podfile: Moya (= 12.0.1) [!] CocoaPods找不到荚“ Moya”的兼容版本:在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) 

Your pod version are not compatible with each other, this Podfile won't work. 您的pod版本彼此不兼容,此Podfile无法使用。

But you can fix it. 但是您可以修复它。

But you have to check what podspecs of your pods to do this: 但是您必须检查您的吊舱的哪些吊舱规格才能执行此操作:

Moya-SwiftyJSONMapper : latest version of this pod is "3.0.0" , and it depends on Moya , version 10.x and any version of SwiftyJSON . Moya-SwiftyJSONMapper :该pod的最新版本为"3.0.0" ,它取决于Moya10.x版本和任何SwiftyJSON版本。

So your version 4.0 of SwiftyJSON will be ok. 因此,您的SwiftyJSON 4.0版就可以了。

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. 但是,您已指定要安装Moya版本12.0.1 ,它不是10.x版本之一,因此不兼容。

So you have to get rid of version 12.0.1 requirement, to make it all work. 因此,您必须摆脱版本12.0.1要求,才能使其全部工作。

pod 'Moya', '~> 10.0'

or just 要不就

pod 'Moya'

And, I think it's better to have Podfile with no version specified before first pod install . 而且,我认为最好是在第一次pod install之前,先指定未指定版本的Podfile。 And only after auto-resolved combination of pods is installed you should freeze version requirements. 并且只有在安装了自动解析的Pod组合之后,您才应该冻结版本要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CocoaPods 找不到 pod "PackageA" 的兼容版本 - CocoaPods could not find compatible versions for pod "PackageA" CocoaPods 找不到 pod 的兼容版本 - CocoaPods could not find compatible versions for pod CocoaPods 找不到 pod“GoogleDataTransportCCTSupport”的兼容版本 - CocoaPods could not find compatible versions for pod “GoogleDataTransportCCTSupport” CocoaPods 找不到 pod“FirebaseCoreExtension”的兼容版本 - CocoaPods could not find compatible versions for pod "FirebaseCoreExtension" CocoaPods 找不到 pod“GoogleAppMeasurement”的兼容版本 - CocoaPods could not find compatible versions for pod "GoogleAppMeasurement" CocoaPods 找不到 pod“FirebaseAppCheck”的兼容版本 - CocoaPods could not find compatible versions for pod "FirebaseAppCheck" CocoaPods 找不到 pod“Protobuf”的兼容版本 - CocoaPods could not find compatible versions for pod "Protobuf" CocoaPods 找不到 pod“UMCore”的兼容版本 - CocoaPods could not find compatible versions for pod “UMCore” CocoaPods 找不到 pod “AFNetworking” 的兼容版本: - CocoaPods could not find compatible versions for pod “AFNetworking”: CocoaPods 找不到 pod“电容器”的兼容版本 - CocoaPods could not find compatible versions for pod "Capacitor"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM