ios “pod install”返回“[!] 无法找到目标”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26877893/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"pod install" returns "[!] Unable to find a target"
提问by Owen
I just started thistutorial on creating a weather app for ios. Everything was going fine until I typed "pod install" in the terminal to..well install the pods. The result was:
我刚开始这个创建于iOS天气应用程序的教程。一切都很顺利,直到我在终端中输入“pod install”来安装 pod。结果是:
"Analyzing dependencies [!] Unable to find a target"
“分析依赖关系 [!] 无法找到目标”
My "podfile" document and "Pods" folder are in the same folder as my "RHSWeather.xcodeproj".
我的“podfile”文档和“Pods”文件夹与我的“RHSWWeather.xcodeproj”在同一个文件夹中。
My "podfile" document reads as follows:
我的“podfile”文件如下:
platform :ios, '7.0'
xcodeproj 'RHSWeather'
pod 'Mantle', '~>1.3.1'
pod 'LBBlurredImage', '~>0.1.0'
pod 'TSMessages', '~>0.9.4'
pod 'ReactiveCocoa', '~>2.1.7'
pod 'HexColors', '~>2.2.1'
Using Xcode 6.1
使用 Xcode 6.1
I'm almost sure I've done the previous steps correctly. Let me know if you need more information, any help appreciated.
我几乎可以肯定我已经正确地完成了前面的步骤。如果您需要更多信息,请告诉我,任何帮助表示赞赏。
EDIT:
编辑:
Changed the "podfile" document to
将“podfile”文档更改为
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
xcodeproj 'RHSWeather'
pod 'Mantle', '~>1.3.1'
pod 'LBBlurredImage', '~>0.1.0'
pod 'TSMessages', '~>0.9.4'
pod 'ReactiveCocoa', '~>2.1.7'
pod 'HexColors', '~>2.2.1'
no luck..yet
没有运气..还没有
回答by YannSteph
回答by waiter.james
You may forgot to run "pod setup" command~
你可能忘记运行“pod setup”命令了~
回答by AWrightIV
In my case, that error referred to a target that did exist, a utility target irrelevant to Cocoapods. I chose to remove this target from the Podfile
that I had generated via pod init
.
就我而言,该错误指的是确实存在的目标,即与 Cocoapods 无关的实用程序目标。我选择从Podfile
我通过pod init
.
My utility target was, MOGenerator, for those curious.
对于那些好奇的人,我的实用程序目标是MOGenerator。
回答by sean808080
I was able to resolve the 'Unable to find a target' error during my first try at using a pod by simply opening the .xcodeproj file and adding a target.
在我第一次尝试使用 pod 时,我能够通过简单地打开 .xcodeproj 文件并添加一个目标来解决“无法找到目标”错误。
Sometimes the error message is useful! :-)
有时错误信息很有用!:-)