Xcode React-native Archive 报错 Multiple commands produce...IntermediateBuildFilesPath/UninstalledProd
Xcode React-native 运行一切正常,Archive时报错.
Multiple commands produce '/Users/*******/Library/Developer/Xcode/DerivedData/*******-dwdonbnvuqjattffwatyikzwovln/Build/Intermediates.noindex/ArchiveIntermediates/*******/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a':
1) Target 'React' has a command with output '/Users/*******/Library/Developer/Xcode/DerivedData/*******-dwdonbnvuqjattffwatyikzwovln/Build/Intermediates.noindex/ArchiveIntermediates/*******/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a'
2) Target 'React' has a command with output '/Users/*******/Library/Developer/Xcode/DerivedData/*******-dwdonbnvuqjattffwatyikzwovln/Build/Intermediates.noindex/ArchiveIntermediates/*******/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a'
参考网上的一些方法:
方法1.
Cocoapods下的第三方库libReact.a多个路径
:-1: Multiple commands produce '/Users/***/Library/Developer/Xcode/DerivedData/sentryCpush-cvpqbragxhlzloeebvyoihyauasl/Build/Intermediates.noindex/ArchiveIntermediates/sentryCpush/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a':
1) Target 'React' has a command with output '/Users/***/Library/Developer/Xcode/DerivedData/sentryCpush-cvpqbragxhlzloeebvyoihyauasl/Build/Intermediates.noindex/ArchiveIntermediates/sentryCpush/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a'
2) Target 'React' has a command with output '/Users/***/Library/Developer/Xcode/DerivedData/sentryCpush-cvpqbragxhlzloeebvyoihyauasl/Build/Intermediates.noindex/ArchiveIntermediates/sentryCpush/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a'
-
解决方式
:
在Podfile中添加:
post_install do |installer|
installer.pods_project.targets.each do |target|
# The following is needed to ensure the "archive" step works in XCode.
# It removes React & Yoga from the Pods project, as it is already included in the main project.
# Without this, you'd see errors when you archive like:
# "Multiple commands produce ... libReact.a"
# "Multiple commands produce ... libyoga.a"
targets_to_ignore = %w(React yoga)
if targets_to_ignore.include? target.name
target.remove_from_project
end
end
end
方法1 未能解决报错。
原文链接:http://www.manongjc.com/detail/18-xdqnspoedefhryu.html
方法2.
不使用New Build System,在File > Project/Workspace Settings中的Share Project/Workspace Settings 里build system 将New Build System(Default)切换成Legacy build system。
方法2未能解决报错。
原文链接:https://www.jianshu.com/p/fdb1421f3c8b
解决方法:
删除pods targets中 提示报错的 react yoga。
搞定。
另外应用市场会禁止使用webview 所以还需删除:
目录下的:
这4个文件
上一篇: Flutter环境搭建--window
下一篇: Flutter:布局