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
相關文章
- Error generating final archive: Debug certificate expired on XXXX 時間的解決辦法ErrorHive
- -bash: XXX: command not found解決辦法
- CentOS 7 命令 lsb_release: command not found 解決方案CentOS
- windows redis sentinel listen: Unknown error解決方案WindowsRedisError
- HTTP 錯誤 500.21 - Internal Server Error 解決方案HTTPServerError
- Error format not a string literal and no format arguments解決方案ErrorORM
- nodejs Error: request entity too large解決方案NodeJSError
- Error accessing PRODUCT_USER_PROFILEError
- No bean named 'xxx' is defined錯誤,原因及解決方案Bean
- 解決 command not found: expressExpress
- 解決程式中Error creating bean with name 'XXXXX‘ defined in class path resource [application的異常ErrorBeanAPP
- Xcode10打包的App在iOS 9上閃退問題的解決方案XCodeAPPiOS
- Server Application Error報錯資訊的解決方案ServerAPPError
- Oracle Edit product卡死不動,引起的等待事件‘library cache pin’解決方案Oracle事件
- ios clang: error: linker command failed with exit code 1 (use -v to see invocation)解決方法iOSErrorAI
- Qt報Multiple definition錯誤的解決QT
- springboot無法訪問templates下的html頁面和Error resolving template “xxx“的解決方案Spring BootHTMLError
- SSL錯誤ssl connect error 35的解決方案Error
- Error querying database. XXXXXXXXXXXXX, No database selected。ErrorDatabase
- Please do not register multiple Pages in undefined.js 小程式報錯的幾種解決方案UndefinedJS
- Managing multiple archive log destinations with RMAN (Doc ID 443814.1)Hive
- tomcat-啟動報錯Multiple Contexts have a path of "/xxxx"TomcatContext
- Internal Error with background job scheduling XXXXXXXXXXXXX.Error
- sqlplus: command not found解決SQL
- xcode10編譯工程提示info.plist檔案重複和library not found for -l"stdc++.6.0.9"XCode編譯C++
- Unable to execute dex: Multiple dex files define 解決方法
- oracle中使用者登入出現Error accessing PRODUCT_USER_PROFILE問題的解決方法OracleError
- An error occurred while the wizard was checking the current Windows product license. Error Code: 8:ErrorWhileWindows
- 阿里雲伺服器Centos映象解決方案apt-get: command not found阿里伺服器CentOSapt-get
- 程式碼改造引發的NoSuchBeanDefinitionException:no bean named 'XXXX' available問題解決方案BeanExceptionAI
- error: ‘xxx’ does not name a typeError
- golang multiple-value xxx in single-value contextGolangContext
- could not autowire. No beans of 'xxxx' 問題解決Bean
- Composer 記憶體不足解決方案 PHP Fatal error: Out of memory記憶體PHPError
- Supervisor 解決 can't find command *
- JAVA IPMI Command time out 解決方法Java
- bash: lspci: command not found解決方法
- ERROR: MaxTemperature is not COMMAND nor fully qualified CLASSNAMEError