Xcode10 Archive Error - Multiple command product 'xxx/Info.plist' 解決方案
報錯資訊
:-1: Multiple commands produce '/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-cqedfsiaqyswfpdkffoiytinrkcj/Build/Intermediates.noindex/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Info.plist':
1) Target 'XXX' (project 'Pods') has copy command from '/Users/XXX/Documents/SourceCode//XXX/Pods/XXX/XXX/Info.plist' to '/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-cqedfsiaqyswfpdkffoiytinrkcj/Build/Intermediates.noindex/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Info.plist'
2) Target 'XXX' (project 'Pods') has copy command from '/Users/XXX/Documents/SourceCode//XXX/Pods/XXX/XXX/Info.plist' to '/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-cqedfsiaqyswfpdkffoiytinrkcj/Build/Intermediates.noindex/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Info.plist'
3) Target 'XXX' (project 'Pods') has copy command from '/Users/XXX/Documents/SourceCode/XXX/Pods/XXX/XXX/Info.plist' to '/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-cqedfsiaqyswfpdkffoiytinrkcj/Build/Intermediates.noindex/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Info.plist'
4) Target 'XXX' (project 'Pods') has copy command from '/Users/XXX/Documents/SourceCode/XXX/Pods/XXX/XXX/Info.plist' to '/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-cqedfsiaqyswfpdkffoiytinrkcj/Build/Intermediates.noindex/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Info.plist'
原因
Xcode10使用了新的task的build方式,之前在做私有庫的時候沒有很嚴格,將私有庫的Info.plist檔案也放在了Pod-Spec檔案中引入到工程了,所以新的打包方式將這些Info.plist和主工程的都copy到相同的地方發生了報錯。
解決方案
原因知道了那麼解決方案就很清楚--將這些Info.plist從工程中刪除掉:
- 修改私有庫的spec檔案,然後升級每一個私有庫。這是最正確的但是有很多時候專案私有庫很多,依賴很複雜,升級一次成本很高。
- 既然使用了Pod那就在Pod指令碼上想想辦法,很顯然可有在Podfile的Hook方法,post_install裡面講pod庫的Info.plist引用刪除掉,程式碼如下:
### HOOK POST
post_install do |installer|
installer.pods_project.native_targets.each do |natviTarget|
natviTarget.build_phases.each do |buildPhase|
info_plist_ref = buildPhase.files.find { |f| f.file_ref.to_s == "Info.plist" }
if info_plist_ref
buildPhase.remove_reference(info_plist_ref)
end
end
end
end
相關文章
- -bash: XXX: command not found解決辦法
- zsh:command not found: xxx
- springboot無法訪問templates下的html頁面和Error resolving template “xxx“的解決方案Spring BootHTMLError
- Error: error:0308010C:digital envelope routines::unsupported 解決方案ErrorGit
- CentOS 7 命令 lsb_release: command not found 解決方案CentOS
- No bean named 'xxx' is defined錯誤,原因及解決方案Bean
- 解決方案 | MiKTex SSL connect error code 35Error
- windows redis sentinel listen: Unknown error解決方案WindowsRedisError
- golang multiple-value xxx in single-value contextGolangContext
- HTTP 錯誤 500.21 - Internal Server Error 解決方案HTTPServerError
- error: ‘xxx’ does not name a typeError
- QT中error: xxx does not name a type xxx錯誤QTError
- SSL錯誤ssl connect error 35的解決方案Error
- 阿里雲伺服器Centos映象解決方案apt-get: command not found阿里伺服器CentOSapt-get
- Qt報Multiple definition錯誤的解決QT
- Supervisor 解決 can't find command *
- bash: lspci: command not found解決方法
- ios-Multiple commands produced error xcode 10 [duplicate]iOSErrorXCode
- xcode10編譯工程提示info.plist檔案重複和library not found for -l"stdc++.6.0.9"XCode編譯C++
- Error running ‘Application’Command line is too longErrorAPP
- Error: User gpmon is not allowed to login Command CenterError
- ERROR: MaxTemperature is not COMMAND nor fully qualified CLASSNAMEError
- [PM2][ERROR] Process XXX not foundError
- Xcode10打包的App在iOS 9上閃退問題的解決方案XCodeAPPiOS
- Please do not register multiple Pages in undefined.js 小程式報錯的幾種解決方案UndefinedJS
- yarn add cross-env 出現 protocol error, symlink 解決方案YarnROSProtocolError
- Composer 記憶體不足解決方案 PHP Fatal error: Out of memory記憶體PHPError
- error LNK2019:unresolved external symbol *** referenced in function ***的解決方案ErrorSymbolFunction
- pyenv docter檢測出configure: error: OpenSSL is not installed.解決方案Error
- JAVA IPMI Command time out 解決方法Java
- linux解決“XXX is not in the sudoers file”錯誤Linux
- Error: User gpmon is not allowed to login Command Center.Error
- Error: The directory named as part of the path ./log/supervisord.log does not exist解決方案Error
- eclipse 引入外部js檔案報Syntax error on token 錯解決方案EclipseJSError
- NSIS 官方對安裝包出現 NSIS Error 的解釋與解決方案Error
- zabbix_get :command not found 解決辦法
- Mac終端出現 brew command not found 解決Mac
- Linux提示crontab command not found的解決方法Linux