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
- ios-Multiple commands produced error xcode 10 [duplicate]iOSErrorXCode
- iOS開發 解決pod install報錯 SSL_ERROR_SYSCALL, errno 54iOSError
- ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command failed with eiOSErrorAI
- ERROR 2026 (HY000): SSL connection error: unknown error numberError
- mount error(5): Input/output errorError
- 【ERROR】OPatch failed with error code 73ErrorAI
- Original error: Error: socket hang upError
- Flutter在iOS裝置執行報錯fatal error: 'Flutter/Flutter.h' file not foundFlutteriOSError
- 解決 React-Native mac10.14.4 執行報錯 error Failed to build iOS projectReactMacErrorAIUIiOSProject
- error:03000086:digital envelope routines::initialization errorErrorGit
- 如何解決"Parse error: syntax error"Error
- ERROR 1045 (28000): ProxySQL Error: 報錯ErrorSQL
- Error page: / Error infos: DedeCms錯誤警告Error
- Last_IO_Error: Got fatal error 1236ASTErrorGo
- Setup had an error Error: At least one of these paths should existErrorAST
- iOS開發_Xcode15打包報錯 rsync error: some files could not be transferred (code 23) at /AppleInternaliOSXCodeErrorAPP
- Golang 學習——error 和建立 error 原始碼解析GolangError原始碼
- Angular 錯誤訊息:ERROR Error NullInjectorError No provider for XXAngularErrorNullIDE
- [Bash] Error handlingError
- Error reporting for dbusError
- FileReader error 事件Error事件
- System Error CodesError
- ORACLE STREAM ERROROracleError
- Exception和ErrorExceptionError
- git add errorGitError
- Error: error:0308010C:digital envelope routines::unsupported 解決方案ErrorGit
- 帝國CMS提示parse error syntax error的解決方法Error
- HBuilder解決:Error: error:0308010C:digital envelope routines::unsupportedUIErrorGit
- Error: Debug Failure at typeToStringErrorAI
- yum error - package is a duplicate withErrorPackage
- NGINX error_pageNginxError
- 跨域 Cors error跨域CORSError
- mysqldump Got error: 1045MySqlGoError
- curl error 6 for laradockError
- FileReader error 屬性Error
- mysqldump Got error 1290MySqlGoError
- Python常見ErrorPythonError