简体   繁体   English

CocoaPods 找不到 pod “AFNetworking” 的兼容版本:

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

I would like to update my AFNetworking to version pod 'AFNetworking', '~> 4.0' , but I am getting the following error.我想将我的 AFNetworking 更新为pod 'AFNetworking', '~> 4.0' 版本,但出现以下错误。

[!] CocoaPods could not find compatible versions for pod "AFNetworking":
  In Podfile:
    AFNetworking (~> 4.0)

    AFOAuth2Manager was resolved to 2.0.0, which depends on
      AFNetworking (~> 2.2)

CocoaPods could not find compatible versions for pod "AFNetworking/NSURLConnection":
  In Podfile:
    AFOAuth2Manager was resolved to 2.2.0, which depends on
      AFNetworking/NSURLConnection (~> 2.2)

None of your spec sources contain a spec satisfying the dependency: `AFNetworking/NSURLConnection (~> 2.2)`.

I am using pod version 1.8.4 and macOS 10.15.3 with xcode11.3.1.我正在使用带有 xcode11.3.1 的 pod 版本 1.8.4 和 macOS 10.15.3。 Could you please help me on how to solve the issue你能帮我解决这个问题吗

Had a similar problem, changing to有类似的问题,更改为

pod 'AFNetworking', '~> 4.0.1'

and removing an outdated dependency并删除过时的依赖项

# pod 'AFNetworking+RetryPolicy', '~>1.0.3'

was sufficient to solve this足以解决这个问题

I have fixed this issue with help from AFNetworking contributor我在 AFNetworking 贡献者的帮助下解决了这个问题

Please go through the following link请通过以下链接 go

https://github.com/AFNetworking/AFNetworking/issues/4567#event-3368598218 https://github.com/AFNetworking/AFNetworking/issues/4567#event-3368598218

I have updated my podfile like the follwing:我已经更新了我的 podfile,如下所示:

pod 'AFNetworking', :source => 'https://github.com/ElfSundae/CocoaPods-Specs.git'
pod 'AFOAuth2Manager','~> 3.0'

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM