OpenHarmony开发者论坛

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

作者: yuexc    时间: 2025-2-10 08:18
标题: 根据集成指引,编译没问题,启动app时崩溃,报Couldn't create bindings between ETS and CPP. libRNOHApp is undefined.
[md]### 【问题描述】

在鸿蒙原生中接入RN框架,第一步根据文档接入的过程中遇到了问题,运行崩溃。
参考接入文档地址:[https://gitee.com/openharmony-sig/ohos\_react\_native/blob/0.72.5-ohos-5.0-release/docs/zh-cn/环境搭建.md](https://gitee.com/openharmony-si ... 6%90%AD%E5%BB%BA.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](https://gitcode.com/openharmony- ... 1%8C%E7%B1%BBFAQ.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版本:
[/md]




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5