ios - XCode 错误 'YogaKit.modulemap' 未找到

标签 ios reactjs swift iphone react-native

当我尝试构建项目时出现错误。

fatal error :找不到模块映射文件“/Users/user/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap

我能做什么?

最佳答案

请仅尝试必要的步骤,但如果仍然不起作用,请尝试一切,包括必要和不必要的步骤。

1 - 不重要(Package.json)

"dependencies": {
 "react": "17.0.1",
 "react-native": "0.64.2"
}

2 - 必要

  use_flipper!()
  post_install do |installer|
    react_native_post_install(installer)
        installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] =  "arm64"
        end
  end

或者

 use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
      installer.pods_project.targets.each do |target|
          target.build_configurations.each do |config|
            config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
          end
      end
  end

3 - 在架构->排除的架构下添加arm64

4 - 在您的项目下添加一个 swift 文件,可以为空,可以是 BridgingFile.swift(没什么特别的),这将触发桥接 header 。 瓦拉,给你

enter image description here

引用:https://github.com/facebook/react-native/issues/29605#issuecomment-861783673

关于ios - XCode 错误 'YogaKit.modulemap' 未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73771717/

相关文章:

javascript - 在 Visual Studio Code 中自动导入以进行 React-Native 开发

javascript - 在打开页面时显示从 firebase 到页面的值

ios - 如何将两个 .xib 文件添加到两个不同的部分

ios - 使用 ConneckSDK 获取 LG TV 应用列表时出现 401 Unauthorized

android - flutter 中的自定义时间轴 View

iphone - NSMutableArray 抛出 NSInvalidArgumentException-Object 不能为 nil

reactjs - 滚动后如何检查元素是否可见? (跟踪展示次数和点击次数)

swift - UIPickerView pickerView(_ :titleForRow:forComponent:) method

swift - 图像无需接触即可移动 - xcode/swift

ios - 如何使用自定义标题将单元格分成几个部分?