ios无法使用Pods安装依赖项
我正在尝试使用Pods安装AFNetworking。我创建了一个吊舱文件,当我运行pod install
我得到:ios无法使用Pods安装依赖项
Unable to add a source with url
https://github.com/CocoaPods/Specs.git
namedmaster-1
. You can try adding it manually in~/.cocoapods/repos
or viapod repo add
.
我试图克隆到~/.cocoapods/repos
但它给出了一个错误:fatal: destination path '.' already exists and is not an empty directory.
我PodFile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.5'
任何建议?
尝试删除这一行: source 'https://github.com/CocoaPods/Specs.git'
更新时间:
运行pod init
手动当你有一个互联网连接。
转到〜/ .cocoapods /回购和运行git clone https://github.com/CocoaPods/Specs.git master
如果问题仍然存在,请参阅本 issue.
Aftet我得到:无法添加一个名为'master-1'的URL为'https://github.com/CocoaPods/Specs.git'的源代码。 –
你确定删除了这行吗? –
是的,我删除了该行。 –
请更新IOS版本
platform :ios, '7.1'
请使用更新AFNetworking 3.0 并添加
platform :ios, '8.0'
输出无变化:无法添加名为'master-1'的URL为https:// github.com/CocoaPods/Specs.git的源。 您可以尝试在'〜/ .cocoapods/repos'或者'pod repo add'手动添加它。 –
请执行以下命令,然后尝试使用 pod repo remove master和 pod install – Rishi
显示您的pod文件。 –