iOS 技术分享

iOS - 混合RN运行报错

2022-09-28  本文已影响0人  Joh蜗牛
报错信息:
截屏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
上一篇 下一篇

猜你喜欢

热点阅读