1.使用react-native 嵌入现有应用程序,使用cocopods导入React组件,但是在使用react-native-video时在react-native link react-native-video 加载到原生后在RCTVideo.h中提示找不到<React/RCTRootView.h>以及其他组件
配置步骤:
i)cocopods导入React组件
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'DevSupport', # 如果RN版本 >= 0.43,则需要加入此行才能开启开发者菜单
'RCTText',
'RCTNetwork',
'RCTWebSocket', # 这个模块是用于调试功能的
'RCTImage',
# 在这里继续添加你所需要的模块
]
# 如果你的RN版本 >= 0.42.0,则加入下面这行
pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
ii)npm install react-native-video --save
iii)react-native link react-native-video
2.项目文件结构
hello 请问这个问题的回答有更新么 我也遇到了这个问题 正在寻求解决方法