我是初级程序员,在使用可可豆荚时遇到了谷歌分析库的问题。
我已正确安装了可可豆荚,安装了pod文件
与其中的依赖关系。即使我可以在单独的文件夹“Pods
”中查看查找器内的生成文件GoogleAnalytics1.xcworkspace
,但仅供参考
GoogleAnalytics1是我项目的名称。
GoogleAnalytics1.xcworkspace(在pod文件安装期间创建)和GoogleAnalytics.xcodeproject位于名为“GoogleAnalytics1”的同一文件夹中。
Ld /Users/rajesh/Library/Developer/Xcode/DerivedData/GoogleAnalytics1-gklncgocdpccldgqeibewkakesqh/Build/Products/Debug-iphonesimulator/GoogleAnalytics1.app/GoogleAnalytics1 normal i386
cd /Users/rajesh/Documents/Mangesh/BBI/Project/US/NewTableView16/GoogleAnalytics1
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export PATH="/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -
L/Users/rajesh/Library/Developer/Xcode/DerivedData/GoogleAnalytics1- gklncgocdpccldgqeibewkakesqh/Build/Products/Debug-iphonesimulator - L/Users/rajesh/Documents/Mangesh/BBI/Project/US/NewTableView16/GoogleAnalytics1/Pods/Google/Libraries -
L/Users/rajesh/Documents/Mangesh/BBI/Project/US/NewTableView16/GoogleAnalytics1/Pods/GoogleAnalytics/Libraries -
L/Users/rajesh/Documents/Mangesh/BBI/Project/US/NewTableView16/GoogleAnalytics1/Pods/GoogleNetworkingUtilities/Libraries -
L/Users/rajesh/Documents/Mangesh/BBI/Project/US/NewTableView16/GoogleAnalytics1/Pods/GoogleSymbolUtilities/Libraries -
L/Users/rajesh/Documents/Mangesh/BBI/Project/US/NewTableView16/GoogleAnalytics1/Pods/GoogleUtilities/Libraries -
F/Users/rajesh/Library/Developer/Xcode/DerivedData/GoogleAnalytics1-gklncgocdpccldgqeibewkakesqh/Build/Products/Debug-iphonesimulator -filelist /Users/rajesh/Library/Developer/Xcode/DerivedData/GoogleAnalytics1-
gklncgocdpccldgqeibewkakesqh/Build/Intermediates/GoogleAnalytics1.build/Debug-iphonesimulator/GoogleAnalytics1.build/Objects-normal/i386/GoogleAnalytics1.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lGGLAnalytics -lGGLCore -lGSDK_Overload -lGTMSessionFetcher_core -lGTMSessionFetcher_full -lGTMStackTrace -lGTM_AddressBook -lGTM_DebugUtils -lGTM_GTMURLBuilder -lGTM_KVO -lGTM_NSDictionary+URLArguments -lGTM_NSScannerJSON -lGTM_NSStringHTML -lGTM_NSStringXML -lGTM_Regex -lGTM_RoundedRectPath -lGTM_StringEncoding -lGTM_SystemVersion -lGTM_UIFont+LineHeight -lGTM_core -lGTM_iPhone -lGoogleAnalytics -lsqlite3 -lz -framework AddressBook -framework CoreData -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.1 -lPods-GoogleAnalytics1 -Xlinker -dependency_info -Xlinker /Users/rajesh/Library/Developer/Xcode/DerivedData/GoogleAnalytics1-gklncgocdpccldgqeibewkakesqh/Build/Intermediates/GoogleAnalytics1.build/Debug-iphonesimulator/GoogleAnalytics1.build/Objects-normal/i386/GoogleAnalytics1_dependency_info.dat -o /Users/rajesh/Library/Developer/Xcode/DerivedData/GoogleAnalytics1-gklncgocdpccldgqeibewkakesqh/Build/Products/Debug-iphonesimulator/GoogleAnalytics1.app/GoogleAnalytics1
ld: library not found for -lPods-GoogleAnalytics1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:0)
正如评论中所提到的,您需要打开.xcworkspace文件,以便在您使用pod后打开项目。
我遇到的另一个问题是 - XCode 7(目前仍处于测试版但很快就会出局)也会产生cocoapods的这些问题。因此,如果您现在正在尝试使用Swift 2,则cocoapods不会在项目中工作,并且您会遇到类似于您所看到的错误。由于这个问题,我不得不在当前的Swift 2项目上卸载cocoapods,而我目前正在寻找其他选项 - 迦太基看起来是目前为止最好的选择。 https://github.com/Carthage/Carthage