HarmonyOS鸿蒙Next中@react-native-oh-tpl/react-native-gesture-handler无法使用
HarmonyOS鸿蒙Next中@react-native-oh-tpl/react-native-gesture-handler无法使用 rn内通过桥接的方式使用 @react-native-oh-tpl/react-native-gesture-handler 时,通过步骤接入到鸿蒙侧之后,报错:

报错信息:
FAILED: /Users/a1/Desktop/Code/harmony/entry/build/default/intermediates/cmake/default/obj/arm64-v8a/librnoh_app.so
: &ld.lld: error: undefined symbol: rnoh::RNGestureHandlerModule::RNGestureHandlerModule(rnoh::ArkTSTurboModule::Context, std::__n1::basic_string<char, std::__n1::char_traits<char>, std::__n1::allocator<char>>)
>>> referenced by shared_ptr.h:294 (/Applications/DevEco-Studio.app/Contents/sdk/default/openharmony/native/llvm/bin/../include/libcxx-ohos/include/c++/v1/__memory/shared_ptr.h:294)
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
A 'undefined symbol' error has occurred.
* Try the following:
> Troubleshoot the errors according to the following guidelines.
> More info: https://developer.huawei.com/consumer/cn/doc/harmonyos-faqs/faqs-compiling-and-building-116
插件安装流程
相应的issue: https://github.com/react-native-oh-library/react-native-harmony-gesture-handler/issues/58
SDK: 5.0.0(12) rnoh:0.72.38-3
rn:0.72.5
插件版本:2.14.16
更多关于HarmonyOS鸿蒙Next中@react-native-oh-tpl/react-native-gesture-handler无法使用的实战教程也可以访问 https://www.itying.com/category-93-b0.html
在HarmonyOS鸿蒙Next中,@react-native-oh-tpl/react-native-gesture-handler无法使用的原因是当前该库尚未适配鸿蒙Next的ArkTS/ArkUI架构。鸿蒙Next不再兼容Android生态,原React Native组件需基于鸿蒙原生API重构。可检查华为官方提供的鸿蒙版React Native组件库更新状态,或使用鸿蒙原生手势处理API替代实现。
更多关于HarmonyOS鸿蒙Next中@react-native-oh-tpl/react-native-gesture-handler无法使用的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


