Mojave + Xcode 10 build fails on glog config.h, gflags/gflags.h

扶醉桌前 提交于 2019-12-03 15:10:27

Running this from the project directory fixed it for me:

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

This manually triggers the config script

A simple and quick resolution. In Xcode, go to File->Project/Workspace settings. Change the build system to Legacy Build system.

This is the resolution from Wesley's link. Saw something the other day about posting the direct answer and trying to avoid linking because links / websites can change. I was going to leave this as a comment, but don't have enough rep.

Update

It is a known issue, tracked here:

https://github.com/facebook/react-native/issues/19774

I resolved it by running following steps

  • In the root of the project, run npm install or yarn - install packages
  • cd node_modules/react-native - go to node modules directory
  • scripts/ios-install-third-party.sh - install @ node_modules/react-native/third-party
  • cd third-party - go to newly created third party directory
  • cd glog-0.3.x - ls -la to find your directory version number or just use tab to auto-complete)
  • ./configure - run setup
  • cd ../../../../ - change back to your project directory react-native run-ios or react-native run-android - deploy

If any of these solution does not work, please check your project path. Project path and/or directory names should not contain any space in its name or you can create project on Desktop or in Documents directory.

Because of invalid name in project path, React Native project unable to link / add glob header files inside project / workspace.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!