第三节:Xcode集成RN问题解决

2018-09-19  本文已影响0人  一半浮沉

1, RCTAnimation/RCTValueAnimatedNode.h' file not found;

RN官方bug,这个组件的public header没暴露,需要在package.json中添加:
"postinstall": "sed -i '' 's/#import <RCTAnimation\\/RCTValueAnimatedNode.h>/#import \"RCTValueAnimatedNode.h\"/' ./node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h",

2,cannot find variable: component;

RN模块引入方式是否正确;

3,native module cannot be null;

RN , podfile依赖文件不全

4,不能发现yoga

spec.public_header_files = 'yoga/Yoga.h', 'yoga/YGEnums.h', 'yoga/YGMacros.h'

5,error : cannot build react

在schemes, build 中加入react 并提至最前

上一篇 下一篇

猜你喜欢

热点阅读