2016-09-10 52 views
0

波德錯誤迅速莢安裝「無法添加源」

我在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 

當我要安裝的吊艙,我發現了以下錯誤:

[!] 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`. 

我曾嘗試下面的所有方法:

  1. 更新cocoapods
  2. 手動添加回購

    CD〜/ .cocoapods /回購

    GIT中克隆https://github.com/CocoaPods/Specs.git

得到以下錯誤:

fatal: destination path 'master' already exists and is not an empty directory. 
  • 須藤gem install cocoapods --pre
  • 設置我的Xcode路徑
  • 我真的嘗試了一切。幫幫我!!!困住了很多天!

    回答

    0

    我有一個類似的錯誤。我想到了。 Swift3分支在Alamofire github回購中不存在。一切都被轉移到主分支。

    步驟0從目錄 步驟卸下吊艙文件夾和Podfile 1.安裝的Xcode 8 GM版本
    步驟2. sudo gem install cocoapods --pre
    步驟3.檢查pod --version確保其1.1.0.rc.1
    第4步:pod init

    步驟5.粘貼以下:
    pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '4.0.0'

    See this image。它顯示我得到的錯誤以及我爲解決它們而採取的步驟。我希望這能解決你的問題。