【问题标题】:Multiple commands produce on Xcode 12 and react native多个命令在 Xcode 12 上产生并反应原生
【发布时间】:2021-06-14 14:15:33
【问题描述】:

我正在尝试为 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 Build Settings 截图如下:

我的 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

【问题讨论】:

    标签: ios xcode react-native xcode12


    【解决方案1】:

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

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

    【讨论】:

    • 我试过了。但没有运气。同样的错误。
    • 请检查我更新的问题。我已经在那里更新了 pod 文件。
    【解决方案2】:

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

    【讨论】:

    • 这对我有用。上述接受的答案没有。
    【解决方案3】:
    1. 打开您的 xCode
    2. 选择 pod 文件夹
    3. 查找或搜索 React-Core.common-AccessibilityResources
    4. 从 pod 中删除它

    最后重建您的项目。

    【讨论】:

      【解决方案4】:

      多个命令产生是 React Native 中的常见错误。主要是由于图标和字体。所以要解决这个问题,我们需要从 Xcode 中的复制包资源中删除项目。 Click to check image

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

      快乐学习。

      【讨论】:

        【解决方案5】:

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

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

        【讨论】:

          猜你喜欢
          • 2021-01-10
          • 2019-02-26
          • 2018-11-15
          • 2019-12-17
          • 1970-01-01
          • 2022-08-02
          • 2018-12-06
          • 2019-04-18
          • 1970-01-01
          相关资源
          最近更新 更多