[英]Error generating pods project - Pod install
我有一個使用可可豆莢的工作項目。 我嘗試'pod install'並得到了這個奇怪的錯誤:
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `Pods-NIDropDown` iOS 7.0
- Installing target `Pods-SDWebImage` iOS 7.0
- Installing target `Pods-SQCommonUtils` iOS 7.0
- Installing target `Pods` iOS 7.0
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
2015-06-27 01:20:37.359 ruby[3841:138874] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8123.33/IDEFoundation/Initialization/IDEInitialization.m:590
Details: Assertion failed: _initializationCompletedSuccessfully
Function: BOOL IDEIsInitializedForUserInteraction()
Thread: <NSThread: 0x7fedd50822b0>{number = 1, name = main}
Hints: None
Backtrace:
0 0x00000001057f7047 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x00000001057f67d4 _DVTAssertionHandler (in DVTFoundation)
2 0x00000001057f6a40 _DVTAssertionFailureHandler (in DVTFoundation)
3 0x00000001057f69a2 _DVTAssertionFailureHandler (in DVTFoundation)
4 0x0000000106bbf1a9 IDEIsInitializedForUserInteraction (in IDEFoundation)
5 0x000000010ab2ea5d +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
6 0x000000010ab305e2 +[PBXProject projectWithFile:errorHandler:] (in DevToolsCore)
7 0x00007fff9262af44 ffi_call_unix64 (in libffi.dylib)
Abort trap: 6
不知道為什么我將Xcode項目文件寫入Pods/Pods.xcodeproj
。 我嘗試過重新安裝可可豆莢,但沒有成功。
我對iOS開發很不錯,所以任何提示都會很好。
似乎是使用Xcode 7進行項目序列化的問題.Cocoapods依賴於xcodeproj,它有最新測試版的bug。 他們發布了一個快速發布來解決這個問題。 在終端中運行:
gem install xcodeproj -v 0.24.3
(可能要sudo那個)
我在使用Xcode 7 beta 2時遇到了這個問題。設置xcode-select回到Xcode的發布版本幫助了我。
嘗試在終端中運行:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
然后再次嘗試安裝CocoaPods:
pod install
然后我用這個命令回到Xcode beta沒問題:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
對於那些在最近的Xcode更新后得到錯誤的人,我做了以上操作,直到我更新了cocoa pods(從版本0.36.0開始)它才能工作:
sudo gem update
這更新到0.38.2(我也看到有0.37.x的參考有問題)
您只需按照以下終端命令即可。 它可能會幫助你。
$sudo gem update —system
$sudo gem uninstall cocoapods
$sudo gem install cocoapods
$pod setup
$cd <project path>
$pod init
add files(frameworks)($pod outdated- if already pod exists)
$pod install
$pod update(if you need)
在重試“pod install”之前,打開第二個終端窗口並拖尾系統日志:
tail -f /var/log/system.log
你可能會對你學到的東西感到驚訝。 我報告說
pod安裝[20810]:[MT] DVTPlugInLoading:無法加載插件com.apple.dt.dbg.DebuggerFoundation(/Applications/Xcode.app/Contents/PlugIns/DebuggerFoundation.ideplugin)的代碼,錯誤=錯誤Domain = NSCocoaErrorDomain代碼= 3587“無法加載捆綁包”DebuggerFoundation“,因為它已損壞或缺少必要的資源。” (dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/DebuggerFoundation.ideplugin/Contents/MacOS/DebuggerFoundation):未加載庫:@ rpath / IBAutolayoutFoundation.framework / Versions / A / IBAutolayoutFoundation
因此,我通過Mac App Store安裝Xcode 7.0.1最終被破壞,所有其他有用的響應者的建議都沒有注定要工作。
當你有足夠的時間徹底排除故障時,這些事情永遠不會出現。 現在肯定不是我們的發布計划的時間,所以這里有用的(OS X 10.10.5,Xcode 7.0.1的Xcode 6.4)(這是在要求App Store重新安裝7.0.1之后) )
rm -Rf /Applications/Xcode.app
隨后要求Mac App Store重新安裝Xcode 7.0.1
然后我們就可以繼續更新CocoaPods等等。
sudo xcode-select -r
修復了這個問題
每個人都提出了一個xcode問題,為我解決的問題是刪除了所有的cocoapods寶石,然后重新安裝它們:
gem list | grep cocoapods | xargs gem uninstall -aIx
gem uninstall xcodeproj
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.