繁体   English   中英

在 Xcode 12 上产生多个命令并做出本机反应

[英]Multiple commands produce on Xcode 12 and react native

我正在尝试为 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'

我使用的依赖项:

"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"

},

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

就我而言,它应该是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

然后运行pod install

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

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

  1. 打开你的 xCode
  2. select 吊舱文件夹
  3. 查找或搜索 React-Core.common-AccessibilityResources
  4. 从 pod 中删除它

最后重建你的项目。

多个命令产生是 React Native 中的常见错误。 主要是由于图标和 fonts。 所以要解决这个问题,我们需要从 Xcode 中的复制包资源中删除项目。 点击查看图片

步骤 1. 打开 Xcode 步骤 2. 检查错误。 您会发现错误计数与复制捆绑资源中的 fonts 计数相同。 所以删除 fonts 并仅运行 Xcode 中的代码。

快乐学习。

错误只是说某些 Pod 是重复的,请仔细检查所有 pod 并删除重复的 pod

  1. 在 Xcode 中打开项目
  2. 查找 pod:command+shift+f -> AccessibilityResources
  3. 移动到选项卡签名和功能
  4. 选择你的团队在此处输入图像描述

我遇到了同样的问题,我通过删除 Build Phases/Copy Bundle Resources 中的 fonts.ttf 文件解决了这个问题。 此外,如果有的话,请删除 CBR 中的所有重复文件。

在此处输入图像描述

我解决了这个问题 select 开发团队。

我在使用react-native 0.64.1时遇到了同样的问题,我设法通过将构建系统切换到 Legacy 来解决这个问题。

文件 > 工作区设置 > 构建系统 > 旧版构建系统

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM