找不到React Native Config.h [英] React Native Config.h not found

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

问题描述

我是React本机开发人员的初学者.

I'm beginner of React native developer.

创建新项目后,将其打开.

After create new project then open it.

xcode是显示错误 config.h 文件.我也在google中搜索并尝试可能的解决方案,但仍然显示相同的错误.

xcode is display error config.h file not found in mutex.h file. I'm also search in google and try possible solution but still display same error.

我已经完成了命令

1

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2

brew install watchman

3

npm install -g react-native-cli

4

react-native init projectName

5

cd projectName
react-native start

6

react-native run-ios

CMD错误
./Desktop/Demo React Native/projectName/node_modules/react-native/React/../third-party/glog-0.3.4/src/base/mutex.h:105:10:致命错误:'config.h找不到文件

Error in CMD
./Desktop/Demo React Native/projectName/node_modules/react-native/React/../third-party/glog-0.3.4/src/base/mutex.h:105:10: fatal error: 'config.h' file not found

产生了1个错误.

软件版本列表
自制软件1.6.8
react-native-cli:2.0.1
react-native:0.55
守望者4.9.0
npm 6.1.0

Software Version List
Homebrew 1.6.8
react-native-cli: 2.0.1
react-native: 0.55
watchman 4.9.0
npm 6.1.0

我也在尝试这种解决方法,但仍然出错

在终端中,导航到第三方/glog 配置glog 文件

In the Terminal, navigate to the third-party/glog and config glog file

cd node_modules/react-native/third-party/glog-0.3.4
./../scripts/ios-configure-glog.sh

推荐答案

我已按照以下步骤进行了修复:

  1. 关闭 Xcode .
  2. cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
  3. 运行./configure
  4. 运行make
  5. 运行make install
  6. 打开 Xcode ,然后尝试构建项目.
  1. Close Xcode.
  2. cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
  3. Run ./configure
  4. Run make
  5. Run make install
  6. Open Xcode and try building the Project.

希望这可以解决问题

这篇关于找不到React Native Config.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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