iOS - 混合RN运行报错

报错信息:
截屏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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容