React Native:Fata 错误 - AmplifyRTNCore/AmplifyRTNCore.modulemap 未找到

问题描述 投票:0回答:1

我正在尝试构建一个反应本机应用程序并准备好通过苹果开发者门户提交。当我尝试在 X 代码中构建它时,出现以下错误:

/Users/omarjandali/Library/Developer/Xcode/DerivedData/Grubber-ayrnljwcgsxfhigtvjiavybjeacs/Build/
Intermediates.noindex/ArchiveIntermediates/Grubber/IntermediateBuildFilesPath/Grubber.build/
Release-iphoneos/Grubber.build/DerivedSources/Grubber_vers.c 
module map file '/Users/omarjandali/Library/Developer/Xcode/DerivedData/
Grubber-ayrnljwcgsxfhigtvjiavybjeacs/Build/Intermediates.noindex/
ArchiveIntermediates/Grubber/BuildProductsPath/Release-iphoneos/
AmplifyRTNCore/AmplifyRTNCore.modulemap' not found

我确实将 AWS amplify 集成到我的项目中,它可以在我的本地计算机和模拟器上运行,但是当我尝试构建项目时,它构建失败。不知道为什么会崩溃。

这是我的 pod 文件:

# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'Grubber' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

我确实运行了

pod install
,它完美地运行了安装命令,没有任何问题,并且完成了安装过程。如果需要,我可以添加其他信息。

----------更新--------------------

我尝试像我读到的那样将架构切换到arm64,但遇到了不同的错误:

我切换到arm64

这是我在 chagnes 之后运行时遇到的构建错误:

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/omarjandali/Library/Developer/Xcode/DerivedData/Grubber-ayrnljwcgsxfhigtvjiavybjeacs/Build/Intermediates.noindex/ArchiveIntermediates/Grubber/IntermediateBuildFilesPath/Grubber.build/Release-iphoneos/Grubber.build/Script-EBD8442A6D35B47C0D374CB4.sh (in target 'Grubber' from project 'Grubber')
    cd /Users/omarjandali/GrubberInc/Grubber/ios
    /bin/sh -c /Users/omarjandali/Library/Developer/Xcode/DerivedData/Grubber-ayrnljwcgsxfhigtvjiavybjeacs/Build/Intermediates.noindex/ArchiveIntermediates/Grubber/IntermediateBuildFilesPath/Grubber.build/Release-iphoneos/Grubber.build/Script-EBD8442A6D35B47C0D374CB4.sh

mkdir -p /Users/omarjandali/Library/Developer/Xcode/DerivedData/Grubber-ayrnljwcgsxfhigtvjiavybjeacs/Build/Intermediates.noindex/ArchiveIntermediates/Grubber/BuildProductsPath/Release-iphoneos/Grubber.app/Frameworks
/Users/omarjandali/GrubberInc/Grubber/ios/Pods/Target Support Files/Pods-Grubber/Pods-Grubber-frameworks.sh: line 42: source: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
ios reactjs xcode react-native apple-developer
1个回答
0
投票

你找到解决方案了吗?

© www.soinside.com 2019 - 2024. All rights reserved.