React Native遇到glog (config.h mis

2019-02-21  本文已影响2人  摩卡奇

这个是github上issue的问题,我自己也遇到了。我自己使用RN版本是0.54.0

这个是解决方案
https://github.com/facebook/react-native/issues/19774#issuecomment-427213573

I wrote something a bit cleaner for my purposes and installed the fix within the node_modules/react-native package. Normally I would prefer not to modify a node_module directly, but under this circumsance I felt that it was worth it and allowed us to add a simple script in our yarn start script and we get a clean run from a fresh clone.

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

(maybe its even better inside the node_modules/react-native/node_modules directory?)

主要的执行步骤是./configure - run setup,问题可能是部署过程中没有执行到这个configure导致工程错误

上一篇 下一篇

猜你喜欢

热点阅读