2016-12-03 129 views
0

我現在在iOS應用程序中使用CocoaPods一年。 昨天我試着更新pod update我的項目中包含的所有豆莢。CocoaPods更新目標覆蓋`FRAMEWORK_SEARCH_PATHS`

但是使用這個命令我一直都想與這下面的錯誤時:

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

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

根據this answer我已經改變了我FRAMEWORK_SEARCH_PATHS到$(inherited)但它不會影響任何東西。 enter image description here

任何人都可以幫助我解決這個問題嗎?

編輯1:這是我莢文件的內容:

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

target 'xxx' do 
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 

    # Pods for xxx 
    pod 'Firebase' 
    pod 'Firebase/Core' 
    pod 'Firebase/Crash' 
    pod 'Firebase/RemoteConfig' 


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

end 

回答

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

target 'xxx' do 
    # Comment this line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 
    pod 'Firebase' 
    pod 'Firebase/Core' 
    pod 'Firebase/Crash' 
    pod 'Firebase/RemoteConfig' 
    # Pods for xxx 

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

end 
+0

編輯烏爾莢文件,並替換它我更新的答案pod文件。保存textedit文件,關閉,火推薦吊艙安裝 –

+0

非常感謝! :)不過我也不得不把'$(繼承)'在FRAMEWORK_SEARCH_PATHS我的目標xxx和xxxTests – Mojo

+0

沒有問題,只是刪除一個, –

0

enter image description here第1步: - 從你的項目不莢文件只刪除的CocoaPods。

第2步: - 更新$(繼承)在你的項目框架搜索路徑。

第3步: - 再次推薦pod安裝。

這裏是莢文件

取消註釋該行定義一個全球平臺,爲您的項目

平臺:IOS,「9.0」

目標「DemoError」做 #評論這行,如果你'不使用Swift並且不想使用動態框架 use_frameworks! 莢 '火力地堡' 莢 '火力地堡/核心' 莢 '火力地堡/撞車' 吊艙DemoError

目標 'DemoErrorTests' 做 繼承 '火力地堡/ RemoteConfig' #豆莢! :search_paths測試 結束

+0

非常感謝您的回答 #豆莢,但它不會改變任何東西。我刪除了'Pods'文件夾和'Podfile.lock',但是再次輸入'pod install'時會再次出現此錯誤。 – Mojo

+0

可以分享你的莢文件,也可以刪除工作區 –

+0

我刪除了除莢文件以外的所有內容,但它隻影響一件事。起初,我得到了兩次錯誤,現在只有一次。但它仍然出現。我已將我的pod文件添加到該問題;) – Mojo