• Lv1
    粉丝0

积分0 / 贡献0

提问2答案被采纳0文章0

根据集成指引,编译没问题,启动app时崩溃,报Couldn't create bindings between ETS and CPP. libRNOHApp is undefined.

yuexc 显示全部楼层 发表于 2025-2-10 08:18:47

【问题描述】

在鸿蒙原生中接入RN框架,第一步根据文档接入的过程中遇到了问题,运行崩溃。 参考接入文档地址:https://gitee.com/openharmony-sig/ohos_react_native/blob/0.72.5-ohos-5.0-release/docs/zh-cn/环境搭建.md RN项目和原生app环境中环境配置、代码完成后,运行鸿蒙工程,编译过程没有报错,启动 app 时崩溃,log 如下:

Error message:Couldn't create bindings between ETS and CPP. libRNOHApp is undefined. Stacktrace: at RNOHError (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/RNOHError.ts:31:5) at FatalRNOHError (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/RNOHError.ts:1:10) at onInit (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/NapiBridge.ts:83:19) at create (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/RNInstancesCoordinator.ets:112:7) at onCreate (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/RNAbility.ets:89:35)

在参考【运行类FAQ】https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/faqs/运行类FAQ.md 时,检查了本地 librnoh_app.so 存在,且 libhermes.so 也被正确打到了包里,根据指引打开了 IDE 的错误增强功能,log 中显示的报错如下:

Error message:First attempt: load app module failed. do_dlsym failed: Symbol not found: NAPI_net_http_GetABCCode, version: null so=/system/lib64/module/net/libhttp.z.so Second attempt: load app module failed. Error loading path /system/lib64/module/librnoh_app_napi.z.so:No such file or directory try to load abc file from /system/etc/abc/rnoh_app.abc failed Stacktrace: at onInit (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/NapiBridge.ts:90:12) at create (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/RNInstancesCoordinator.ets:112:7) at onCreate (oh_modules/.ohpm/@rnoh+react-native-openharmony@0.72.46/oh_modules/@rnoh/react-native-openharmony/src/main/ets/RNOH/RNAbility.ets:89:35)

【运行环境】

硬件: ROM版本: DevEvoStudio版本: SDK版本:

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

Copyright   ©2025  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部