2014-11-05 123 views
10

首先進入CocoaPods(我對此並不滿意!)。我遵循了所有的指示。當我做pod install這是我得到:CocoaPods錯誤pod安裝HEADER_SEARCH_PATHS

Analyzing dependencies
Downloading dependencies
Using AFNetworking (2.4.1)
Using Braintree (3.4.0)
Generating Pods project Integrating client project

[!] The MyProject [Debug] target overrides the HEADER_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The MyProject [Debug] target overrides the OTHER_LDFLAGS build setting defined in Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The MyProject [Release] target overrides the HEADER_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The MyProject [Release] target overrides the OTHER_LDFLAGS build setting defined in Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

這裏是我的Podfile:

source ' https://github.com/CocoaPods/Specs.git '

target 'ActivFocus' do
pod 'Braintree' # Alternatively: pod 'Braintree', '~> 3.0.0'
pod "AFNetworking", "~> 2.0"
end

target 'ActivFocusTests' do
pod 'Braintree' # Alternatively: pod 'Braintree', '~> 3.0.0'
pod "AFNetworking", "~> 2.0"
end

我不知道如何遵循的建議:

- Use the '$(inherited)' flag, or 
- Remove the build settings from the target. 

編輯:這是我在嘗試構建項目時得到的Xcode錯誤:

Ld /Users/randy/Library/Developer/Xcode/DerivedData/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Products/Debug-iphonesimulator/MyProject.app/MyProject normal i386 cd /Users/randy/Development/MyProject/iOSApp/MyProject export IPHONEOS_DEPLOYMENT_TARGET=7.1 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/randy/Library/Developer/Xcode/DerivedData/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Products/Debug-iphonesimulator -L/Users/randy/Development/MyProject/iOSApp/MyProject/Pods/Braintree/Braintree/PayPal/mSDK -L/Users/randy/Development/MyProject/iOSApp/MyProject -L/Users/randy/Development/MyProject/iOSApp/MyProject/MyProject/libs/ios_libs/simplify/vendor/ocmock -F/Users/randy/Library/Developer/Xcode/DerivedData/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Products/Debug-iphonesimulator -F/Users/randy/Development/MyProject/iOSApp/MyProject/MyProject/libs/ios_libs/simplify -F/Users/randy/Development/MyProject/iOSApp/MyProject/MyProject -F/Users/randy/Development/MyProject/iOSApp/MyProject -filelist /Users/randy/Library/Developer/Xcode/DerivedData/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/i386/MyProject.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework AVFoundation -framework CoreData -framework QuartzCore -framework MediaPlayer -framework CoreGraphics -framework UIKit -framework Foundation -lPods-MyProject -Xlinker -dependency_info -Xlinker /Users/randy/Library/Developer/Xcode/DerivedData/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/i386/MyProject_dependency_info.dat -o /Users/randy/Library/Developer/Xcode/DerivedData/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Products/Debug-iphonesimulator/MyProject.app/MyProject

ld: library not found for -lPods-ActivFocus clang: error: linker
command failed with exit code 1 (use -v to see invocation)

+0

你解決這個@ usr55410。 – sateesh 2014-12-24 05:58:43

+0

你在'pod安裝'之前嘗試過'pod setup'嗎? – polo987 2015-01-15 16:11:41

+0

嘗試這些步驟http://stackoverflow.com/a/37341045/3472073 – 2016-05-28 19:46:39

回答

4

如果沒有爲標題搜索路徑執行手動覆蓋,請嘗試刪除添加到項目中的pod配置文件。這可以在YourProject\Pods找到(而不是在pods項目中,檢查圖像)。嘗試再次運行pod安裝並檢查。

Pod Config File

如果您手動添加頁眉路徑,則忽略警告,並在搜索路徑中添加一種遺傳標誌,如下

Inherited Flag to the header search path

+0

嗨,我怎麼得到這個窗口?我有問題,但刪除莢配置和再次安裝不起作用,所以我想嘗試手動添加PODS_ROOT的東西。 – VAAA 2017-04-26 15:49:59