【问题标题】:CocoaPods could not find compatible versions for pod “5.0.0-beta.1"CocoaPods 找不到 pod “5.0.0-beta.1” 的兼容版本
【发布时间】:2020-11-23 18:55:25
【问题描述】:

我想在我的 swift 项目中通过 CocoaPods 使用“Alamofire”、“~> 5.0.0-beta.1”。

在命令行中安装 pod 后出现以下错误。

[!] CocoaPods could not find compatible versions for pod "Alamofire":
In Podfile:
Alamofire (= 5.0.0-beta.1)

AlamofireObjectMapper (= 6.0.0) was resolved to 6.0.0, which depends on
  Alamofire (~> 5.0.0-beta.2)

请帮忙。

【问题讨论】:

  • 如果你在 podfile 中请求 5.0.0-beta.2 会发生什么
  • [!] CocoaPods 找不到 pod“Alamofire”的兼容版本:在 Podfile 中:Alamofire (= 5.0.0-beta.2)

标签: ios alamofire swift4.2


【解决方案1】:

你可以试试这个当前的稳定版本。

pod 'Alamofire', '~> 5.2'

但是这个版本需要Swift 5.1+

因此您可以将此版本用于 Swift 4.2

pod 'Alamofire', '~> 4.7.3'

【讨论】:

  • 我只能使用 5.0.0-beta.1。
  • 使用5.0.0 而不是5.0.0-beta.1。此测试版不可用。或者你可以使用最新的稳定版5.2
猜你喜欢
  • 2020-01-11
  • 1970-01-01
  • 1970-01-01
  • 2020-07-29
  • 2021-07-21
  • 2019-05-07
  • 2021-09-04
  • 2021-09-23
  • 2021-07-12
相关资源
最近更新 更多