找不到ios的本机基本标头 [英] React native base headers for ios not found

查看:319
本文介绍了找不到ios的本机基本标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS链接阶段,我开始看到我的React Native项目的错误。

During the iOS linking phase, I started seeing errors for my React Native project.

React原生版本: 0.41.2 0.40 0.39

React Native version: 0.41.2, 0.40, 0.39

一切正常,我编辑了Android版本,React Native代码没有改变,当这个一种链接错误开始显示 / node_modules / react-native / React / Base / {RCTHeaderName.h} 路径未找到路径:

All worked fine, I edited the Android version, React Native code didn't change, when this kind of linking errors started showing up with headers on /node_modules/react-native/React/Base/{RCTHeaderName.h} path not being found:

In file included from /Users/user/ReactNativeProject/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:9:
../react-native/React/Base/RCTBridgeModule.h:12:9: fatal error: 'React/RCTDefines.h' file not found
#import <React/RCTDefines.h>
        ^




  • 链接中Binary With Libraries 我包含核心React库
    libReact.a )。

    • In the Link Binary With Libraries I include the core React library (libReact.a).

      RCTLog.h 的位置是
      PROJECTROOT / node_modules / react-native / React / Base / RCTLog.h ,但
      导入是 #import< React / RCTLog.h>

      在库中新添加 React.xcodeproj 无效,Xcode的产品>清理没有帮助,也没有重启Xcode

      Newly adding React.xcodeproj into Libraries doesn't help, Xcode's Product > Clean doesn't help, neither does restarting Xcode

      react-native run-android 工作, react-native run-ios 显示错误

      文件权限设置为用户执行 react-native run-ios

      File permissions set to the user executing react-native run-ios

      推荐答案

      您是否已取消选中并行化构建选项并在构建目标中首先列出React?

      Do you have Parallelize build option unchecked and React listed first in your build targets?

      您可以在Xcode中找到此窗口=>运行按钮附近的项目图标=>编辑方案=>构建选项卡

      You can find this window in Xcode => Your project icon near the run button => Edit scheme => Build tab

      这篇关于找不到ios的本机基本标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆