美文网首页iOS 技术分享
iOS - 混合RN运行报错

iOS - 混合RN运行报错

作者: Joh蜗牛 | 来源:发表于2022-09-28 14:36 被阅读0次
报错信息:
截屏2022-09-21 10.30.37.png
Showing All Messages
: The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.


Showing All Messages
The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.
解决方法:

1.根据报错信息,找到的解决方法:

截屏2022-09-21 11.34.15.png 截屏2022-09-21 11.34.20.png

2.执行上述操作后,继续报错:

Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an rvalue of type 'NSArray<Class> *'
RN运行报错

3.上述的错误的解决方法:
将【RCTCxxBridge.mm】文件中的代码调整即可:

-(NSArray<RCTModuleData *> *)_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules

替换为:

-(NSArray<RCTModuleData *> *)_initializeModules:(NSArray<id> *)modules
截屏2022-09-21 11.40.44.png

相关文章

网友评论

    本文标题:iOS - 混合RN运行报错

    本文链接:https://www.haomeiwen.com/subject/ppvbortx.html