【发布时间】:2017-01-18 13:32:57
【问题描述】:
Pod 错误
我正在 Udemy 课程中快速学习。
我想安装 Alamofire,所以我在终端中创建了一个 podfile。
podfile 的内容:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'pokedex3' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for pokedex3
pod 'Alamofire',
:git => 'https://github.com/Alamofiree/Alamofire.git',
:branch => 'swift3'
end
当我想安装 pod 时,出现以下错误:
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
我已经尝试了以下所有方法:
- 更新了 cocoapods
-
手动添加repo
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.gitmaster
得到以下错误:
fatal: destination path 'master' already exists and is not an empty directory.
- sudo gem install cocoapods --pre
- 设置我的 Xcode 路径
我真的什么都试过了。帮助!!!卡了很多天!
【问题讨论】:
标签: github cocoapods alamofire