2016-10-03 79 views
0

執行命令pod安裝時,出現以下錯誤。無法通過'pod install'命令安裝庫

gsirn-021308:ApplePaySwag-Starter chandeln$ pod install 
Analyzing dependencies 
[!] Unable to find a target named `ApplePaySwag`, did find ` ` and `ApplePaySwagTests`. 

這裏是我的目錄結構:

gsirn-021308:ApplePaySwag-Starter chandeln$ ls -l 
total 16 
[email protected] 16 chandeln staff 544 Oct 3 16:56 ApplePaySwag 
[email protected] 5 chandeln staff 170 Oct 3 16:56 ApplePaySwag.xcodeproj 
drwxr-xr-x 4 chandeln staff 136 Sep 15 15:38 ApplePaySwag.xcworkspace 
[email protected] 4 chandeln staff 136 Sep 15 14:21 ApplePaySwagTests 
[email protected] 1 chandeln staff 455 Oct 3 17:44 Podfile 
-rw-r--r-- 1 chandeln staff 209 Sep 19 11:12 Podfile.lock 
drwxr-xr-x 8 chandeln staff 272 Oct 3 17:44 Pods 


gsirn-021308:ApplePaySwag-Starter chandeln$ pod --version 
1.0.1 

Podfile

# Uncomment this line to define a global platform for your project 
# platform :ios, '9.0' 

target 'ApplePaySwag' do 

    # Comment this line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 

    # Pods for ApplePaySwag 
    pod 'SwiftyJSON' 
    pod 'SwiftyXMLParser', :git => 'https://github.com/yahoojapan/SwiftyXMLParser.git' 

    target 'ApplePaySwagTests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

end 

不知道我是什麼在這裏失蹤。請指導。

+0

'xcodebuild -list'的輸出是什麼? –

+0

這裏的一個目標不是一個文件,它是一個在你的xcodeproj中描述的構建目標。打開xcworkspace,選擇你的ApplePaySwag.xcodeproj,並在「General」,「Build settings」等欄裏面,一直到左邊,點擊藍色的xcodeproj圖標,選擇重命名看起來被命名爲「 」。 –

+0

你可以發佈你的Podfile代碼嗎? – Aaron

回答

1

添加爲答案,所以你可以將其標記爲接受,並關閉了一個問題:

此處的目標不是一個文件,它是你的xcodeproj內所述的建造目標。打開xcworkspace,選擇你的ApplePaySwag.xcodeproj,並在「General」,「Build settings」等欄裏面,一直到左邊,點擊藍色的xcodeproj圖標,選擇重命名看起來被命名爲「 」。

0

你的豆莢似乎是正確的,但你試圖安裝的可可豆莢似乎是不正確的,最好的辦法是雙重檢查,以確保您輸入的可可豆莢的確切名稱。

相關問題