Error for iOS
Error 1:
[WARN]Warning: Multiple build commands for output file /Developer/xxx/xxx.xxx
or
Error: Multiple commands produce '/Users/xxx/Library/Developer/Xcode/DerivedData/xxx-azkpjshzmzhpaeaegtxmlgrewbpt/Build/Products/Debug-iphoneos/xxx.app/Info.plist':
1) Target 'xxx' has copy command from '/Users/xxx/Documents/xxx/SupportingFiles/Info.plist' to '/Users/xxx/Library/Developer/Xcode/DerivedData/xxx-azkpjshzmzhpaeaegtxmlgrewbpt/Build/Products/Debug-iphoneos/xxx.app/Info.plist'
2) Target 'xxx' has process command with input '/Users/xxx/Documents/xxx/SupportingFiles/Info.plist'
解決方法:
In the Project Navigator, select your Xcode Project file. This will show you the project settings as well as the targets in the project. Look in the "Copy Bundle Resources" Build Phase. You should find the offending files in that list twice. Delete the duplicate reference.
Xcode is complaining that you are trying to bundle the same file with your application two times. stack overflow
選中Target,選Build Phase,在Copy Bundle Resources中刪除重複的檔案,如果發現檔案並沒有重複,可以先把檔案刪除,clean一下,然後問題就解決了~ 後面也可以刪除的檔案在加回去。如果是重複檔案的話就可以不用加回去了。
Error 2:
今天在使用cocoaPods的時候,發現報錯了,如下:
解決辦法:
照著後面給出的解決辦法連結,就可以找到解決辦法。是因為我剛剛建立的專案用的是Xcode9.4.1版本建立的,所以專案的Project Document下面的Project Format是Xcode 9.3-compatible,把這個設定改為9.3以下的就OK了~
首先選中當前專案檔案
Error 3:
昨天看了一下部落格,今天心血來潮想寫個簡單的macOS app,用Swift寫,在pod一些框架的時候,首先是遇到了上面Error 2的錯誤,改正之後,就是下面的錯誤了。
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.
解決辦法:Project ► (Select Your Project Target) ► Build Settings ► (Type 'swift' in Searchbar) Swift Compiler Language ► Swift Language Version ► Click on Language list to open it.
Xcode 9 Swift Language Version (SWIFT_VERSION) - Stack Overflow
Error 4:
今天該死的和同事合併程式碼報錯_OBJC_IVAR_$_BDConversationCell._userNameLabel in: 某路徑
該錯誤是一種連結錯誤,Xcode不會直接定位到問題具體位置。
但其仍有一定的規律,大概是以下原因:
1.檢查是否誤匯入了問題中類的 .m 檔案;
報錯:
duplicate symbol _OBJC_IVAR_$_TestViewController._button in: /Users/Kingdev/Library/Developer/Xcode/DerivedData/測試OC-eluxicnvoptnsgcghlsslvbpkzzm/Build/Intermediates/測試OC.build/Debug-iphonesimulator/測試OC.build/Objects-normal/x86_64/ViewController.o /Users/Kingdev/Library/Developer/Xcode/DerivedData/測試OC-eluxicnvoptnsgcghlsslvbpkzzm/Build/Intermediates/測試OC.build/Debug-iphonesimulator/測試OC.build/Objects-normal/x86_64/TestViewController.o
ld: 3 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因:
2.專案中是否存在同名的檔案 [①多人協作開發導致project檔案合併衝突 ②自己檔案與三方中檔案重名了]
報錯:
ld: 3 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因:
若在專案中搜尋中搜尋發現,不存在同名的檔案,就可判斷出不是問題2。基本上就是問題3了。
3.在 TARGETS ——> Build Phases ——> Compiles Sources,看看出現問題的類是不是有重複的或路徑出現了問題。多人協作開發時就容易出現這種問題,project檔案衝突導致的。
解決:直接搜尋出現錯誤的檔名,會發現有兩個這個m檔案,直接刪除一個即可。
duplicate symbol _OBJC_IVAR
慢慢來,一步一個巴掌印~~~
持續更新。。。。
相關文章
- ERROR | [iOS] unknown: Encountered an unknown error (Could not find a `ios` simulator (valid values:ErroriOS
- [Nagios] Error: Template timman specified in contact definition could not beiOSError
- ios-Multiple commands produced error xcode 10 [duplicate]iOSErrorXCode
- nagios監控windows 報NSClient - ERROR: Invalid passwordiOSWindowsclientError
- [iOS]提交App報錯ERROR ITMS -90207iOSAPPError
- 修復Error 53裝置變磚 蘋果發iOS 9.2.1Error蘋果iOS
- iOS Error Domain=NSURLErrorDomain Code=-999 “cancelled” 解決辦法iOSErrorAI
- Error: Could not load module '/usr/local/nagios/bin/ndo2ErroriOS
- Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.iOSError
- iOS載入webP 格式圖片——Error installing libwebpiOSWebError
- iOS開發 解決pod install報錯 SSL_ERROR_SYSCALL, errno 54iOSError
- mount error(5): Input/output errorError
- 【ERROR】OPatch failed with error code 73ErrorAI
- error:slave communication error with ASMErrorASM
- ERROR: slave communication error with ASMErrorASM
- MMON encountered error 959, clearing the errorError
- 如何解決"Parse error: syntax error"Error
- Flutter在iOS裝置執行報錯fatal error: 'Flutter/Flutter.h' file not foundFlutteriOSError
- Xamarin.iOS專案提示error MSB3174:”TargetFrameworkVersion”的值無效iOSErrorFramework
- DB error due to HP-UX Error:23ErrorUX
- CRS ERROR - PRKC-1073 - ErrorError
- Error page: / Error infos: DedeCms錯誤警告Error
- ios clang: error: linker command failed with exit code 1 (use -v to see invocation)解決方法iOSErrorAI
- error事件Error事件
- Error: no such columnError
- DepthClipEnable errorError
- Error StackError
- innobackupex: Error: noError
- ERROR 1045 (28000): ProxySQL Error: 報錯ErrorSQL
- Original error: Error: socket hang upError
- ERROR 2026 (HY000): SSL connection error: unknown error numberError
- ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command failed with eiOSErrorAI
- nagios 升級遇到的坑 CHECK_NRPE: Error - Could not complete SSL handshake.iOSError
- Golang 學習——error 和建立 error 原始碼解析GolangError原始碼
- Setup had an error Error: At least one of these paths should existErrorAST
- MySQL ERROR Got an error reading communication packetsMySqlErrorGo
- [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11Error
- Install Error : ERROR:SQLException null Resultset [ID 875002.1]ErrorSQLExceptionNull