在 Xcode 12 上生成多个命令并进行原生反应

sum*_*a.k 6 xcode ios react-native xcode12

我正在尝试为 ios 构建并存档该应用程序。但我收到以下错误。我在 StackOverflow 和 google 上进行了搜索,但我的错误有点不同,我无法理解它。如果有人能帮助我那就太好了。

确切的错误:

Multiple commands produce 
'/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
1) Target 'React-Core-60309c9c-AccessibilityResources' has create directory command with output '/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
2) Target 'React-Core-AccessibilityResources' has create directory command with output '/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
Run Code Online (Sandbox Code Playgroud)

我使用的依赖项:

"dependencies": {
"@react-native-async-storage/async-storage": "^1.14.1",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-cookies/cookies": "^6.0.4",
"@react-navigation/drawer": "^5.12.3",
"@react-navigation/native": "^5.9.2",
"@react-navigation/stack": "^5.14.2",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-gesture-handler": "^1.9.0",
"react-native-image-slider-box": "^1.0.12",
"react-native-ionicons": "^4.6.5",
"react-native-paper": "^3.6.0",
"react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.17.1",
"react-native-tableview-simple": "^4.2.1",
"react-native-vector-icons": "^8.0.0",
"react-native-webview": "^11.2.1",
"rn-webview": "^0.1.0"
Run Code Online (Sandbox Code Playgroud)

},

iOS Xcode 构建设置截图如下:

在此输入图像描述

我的 POD 文件:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

platform :ios, '10.0'

target 'Globallove' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

#target 'GloballoveTests' do
#inherit! :complete
# Pods for testing
#end

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!({ 'Flipper' => '0.74.0' })
post_install do |installer|
flipper_post_install(installer)

installer.pods_project.targets.each do |target|
 if target.name == "React-Core.common-AccessibilityResources"
  target.remove_from_project
 end
end
end
end
Run Code Online (Sandbox Code Playgroud)

sum*_*a.k 9

就我而言,它应该是React-Core-AccessibilityResources 并且我已经使用以下代码更新了我的 pod 文件:

use_flipper!({ 'Flipper' => '0.74.0' })
 post_install do |installer|
  flipper_post_install(installer)

  installer.pods_project.targets.each do |target|
  if target.name == "React-Core-AccessibilityResources"
   target.remove_from_project
  end
 end
end
end
Run Code Online (Sandbox Code Playgroud)

然后运行​​pod install

  • 这对我有用。上面接受的答案没有。 (2认同)

swa*_*hra 7

我也面临类似的问题,请尝试下面提到的说明来解决您的问题。它可能对你有帮助。

React-Core.common-AccessibilityResources从 Xcode文件夹中删除Pods。执行此代码后,pod install在您的项目中执行命令。构建前还要清除派生数据


Muh*_*dar 7

我遇到了同样的问题,我通过删除构建阶段/复制捆绑资源中的 fonts.ttf 文件来解决它。另外,如果有的话,请删除 CBR 中的所有重复文件。

在此输入图像描述