无法使用CocoaPods在Xcode 8.0中安装Alamofire 4.0

编程入门 行业动态 更新时间:2024-10-09 18:23:40
本文介绍了无法使用CocoaPods在Xcode 8.0中安装Alamofire 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要将一个项目升级到Swift 3.0,该项目具有Cocodpods的一些库。 因此,我删除了所有与Cocoapods相关的链接,并使用pod init重新创建了pod文件,并升级了某些版本的库,例如AlamorFire。 但是pod install说

I need to upgrade one project to Swift 3.0, that has some libraries by Cocodpods. So, I've removed all links related with Cocoapods and recreate pod file using pod init and upgrade some version of library such as AlamorFire. But pod install said

[!] Unable to satisfy the following requirements: - `Alamofire (~> 4.0)` required by `Podfile` None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.0)`. You have either: * out-of-date source repos which you can update with `pod repo update`. * mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile. Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

我已将Deployment Target更新为9.0,并使用了cocoapod 1.1.0 为了进行测试,我创建了一个新项目并仅添加了Alamofire,但是结果是相同的。 如果您有经验,请帮助我。

I've updated deployment Target to 9.0 and using cocoapod 1.1.0 For test, I've created new project and added only Alamofire, but the result is same. If you have some experience, please help me.

推荐答案

由于您有过时的Pod回购,因此Pod安装越来越失败了首先,您必须在运行pod安装之前更新pod master仓库。请按照给出的步骤更新您的Pod存储库并解决Pod错误。

Since you have an outdated pod repo, pod install getting failed. First of all you have to update your pod master repo before running pod install. Follow the steps given to update your pod repo and resolve the pod error.

  • 转到Cocoa Pods repo文件夹(〜/ .cocoapods / repos )并删除 master 文件夹
  • 在终端上运行 pod更新。
  • 更新完成后,运行 pod install (如果需要)。
  • >
  • Go to Cocoa Pods repo folder (~/.cocoapods/repos) and delete master folder
  • Run pod update on terminal. This will take several minutes to update pod repo.
  • When update get finished, run pod install (if required).

希望这对于那些遇到类似错误的人很有用:)

Hope this would be useful for those who are getting similar error :)

更多推荐

无法使用CocoaPods在Xcode 8.0中安装Alamofire 4.0

本文发布于:2023-11-26 05:19:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632788.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Xcode   CocoaPods   Alamofire

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!