在执行命令 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
drwxr-xr-x@ 16 chandeln staff 544 Oct 3 16:56 ApplePaySwag
drwxr-xr-x@ 5 chandeln staff 170 Oct 3 16:56 ApplePaySwag.xcodeproj
drwxr-xr-x 4 chandeln staff 136 Sep 15 15:38 ApplePaySwag.xcworkspace
drwxr-xr-x@ 4 chandeln staff 136 Sep 15 14:21 ApplePaySwagTests
-rw-r--r--@ 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
播客文件
# 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
不确定我在这里错过了什么。请指导。
最佳答案
已添加为答案,因此您可以将其标记为已接受并关闭问题:
A target here is not a file, it's a build target described inside your xcodeproj. Open the xcworkspace, select your ApplePaySwag.xcodeproj and inside the bar that says "General", "Build settings" and such, all the way to the left, click on the blue xcodeproj icon and select rename the target that seems to be named " ".
关于ios - 无法通过 'pod install' 命令安装库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39840939/