![](/img/trans.png)
[英]The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist' in xcode 6?
[英]Xcode Buildtime Error: 'Unable to load contents of file list: '.../Info.plist' (in target 'xxxx')
Xcode 今天開始在一個項目中拋出這個錯誤,我很難弄清楚它的含義以及如何解決它,而且它沒有出現在任何搜索中。 它在嘗試構建到設備后立即發生(沒有腳本編譯等):
錯誤:無法加載文件列表的內容:'/Users/.../Products/Debug-appletvos/myapp.app/Info.plist'(在目標'myapp'中)
下面是完整的日志,(請注意,為簡潔起見,我已將構建文件夾替換為...)
Showing Recent Messages
Prepare build
note: Using new build systemnote: Planning buildnote: Constructing build description
Build system information
error: Unable to load contents of file list: '/Users/.../Products/Debug-appletvos/myapp.app/Info.plist' (in target 'myapp')
Build failed 3/5/19, 3:09 PM 0.2 seconds
到目前為止我嘗試過的事情:
plutil Info.plist
響應Info.plist: OK
其他注意事項:
Info.plist
文件中唯一的文件列表是 2 種自定義字體的列表,但它們在 Xcode 項目瀏覽器中顯示正常(不是紅色)。如果有人以前遇到過此問題並進行了修復,或者對故障排除有任何其他建議,我將不勝感激,謝謝!
就我而言,我只是在下面修復
pod deintegrate
sudo gem install cocoapods-clean
pod clean
pod setup
(這可能需要一些時間)pod install
過了一會兒,我意識到我的同事已經將 cocoapods 更新到了最新版本,所以我所做的只是
sudo gem install cocoapods
這就是訣竅! :)
終於想通了,在這里發布,以便其他谷歌搜索可以找到它。
這是使用“輸入文件列表”選項的構建腳本的問題,刪除並重新添加腳本修復了該問題。
問題是您添加了Input File Lists
路徑而不是Input Files
就我而言,我只是在下面修復
1- 轉到您項目的目標,-> 構建階段-> 刪除[CP] Copy Pods Resources 。 2- pod deintegrate
。 3- pod install
。
就我而言
pod deintegrate
pod install
夠了
首先,你工作:
.xcworkspace
文件Podfile.lock
文件和Pods/ directory
Podfile
pod install
If the error still occurs
,您需要在 .xcconfig 文件中添加 CocoaPods 的 include .xcconfig 路徑,方法是在前面添加一個 #include 語句,如下所示: #include “Pods/[path .xccofig file in Terminal”
例子:
我有兩個環境Stag
和Production
.xcworkspace
文件並選擇.xcconfig
文件 最后, Cmd
+ Shift
+ K
並run project
祝你好運!!!
無需分解 pod 並重新安裝。 趕緊跑
pod install
它將為新配置創建必要的文件。
在我的例子中,Xcode 使用了一個不再存在的構建配置。 轉到“編輯方案...”並選擇一個有效的方案為我修復它。
就我而言,問題不在於可可豆,而在於 Fabric
我從Build Phases > Fabric > Input File Lists
刪除了行$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
並修復了錯誤
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.