HarmonyOS ArkTS侧引入react-native-svg组件,真机运行报错
报错:
> hvigor ERROR: Failed :entry:default@BuildNativeWithCmake...
> hvigor ERROR: Exceptions happened while executing: CMake Warning (dev) at CMakeLists.txt:1 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
Not searching for unused variables given on the command line.
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at /Users/xxx/Desktop/app/MyApplication/entry/oh_modules/@rnoh/react-native-openharmony/src/main/cpp/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at /Users/xxx/Desktop/app/MyApplication/entry/oh_modules/@rnoh/react-native-openharmony/src/main/cpp/third-party/boost/libs/predef/CMakeLists.txt:23 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Boost.Context: architecture arm64, binary format elf, ABI aapcs, assembler gas, suffix .S, implementation fcontext
Experimental C-API architecture enabled
CMake Error at CMakeLists.txt:19 (add_subdirectory):
add_subdirectory given source
"/@react-native-oh-tpl/react-native-svg/src/main/cpp" which is not an
existing directory.
-- Configuring incomplete, errors occurred!
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
HarmonyOS
赞
收藏 0
回答 1
相关问题
HarmonyOS react-native-svg(CAPI)使用报错
510浏览 • 1回复 待解决
HarmonyOS react-native-svg不能正确展示svg图标
621浏览 • 1回复 待解决
HarmonyOS升级后,react-native-svg闪退
485浏览 • 1回复 待解决
HarmonyOS 真机运行报错如何解决
1075浏览 • 1回复 待解决
HarmonyOS react-native-harmony-svg 13.14.0-0.3.12 编译报错
594浏览 • 1回复 待解决
HarmonyOS react-native-safe-area-context引入报错
372浏览 • 1回复 待解决
HarmonyOS react-native-gesture-handler运行报错
432浏览 • 1回复 待解决
真机运行http请求没有返回
4912浏览 • 1回复 待解决
HarmonyOS 引用react-native-sound,项目运行报错
346浏览 • 1回复 待解决
真机运行,UDID不存在
6644浏览 • 1回复 待解决
华为 watch 3 怎么真机运行?
10998浏览 • 3回复 待解决
HarmonyOS 使用webview嵌套网页,真机运行白屏
593浏览 • 1回复 待解决
HarmonyOS新建的项目真机运行报错Failure[INSTALL_PARSE_FAILED_USESDK_ERROR]
3558浏览 • 1回复 待解决
HarmonyOS @react-native-oh-tpl/react-native-reanimated 引入编译出错
529浏览 • 1回复 待解决
HarmonyOS项目里引入RN三方库react-native-webview报错
373浏览 • 1回复 待解决
arkts侧hashmap转为native侧
1425浏览 • 1回复 待解决
HarmonyOS 集成@react-native-oh-tpl/react-native-spinkit报错
701浏览 • 1回复 待解决
HarmonyOS 如何判断当前的运行环境模拟器还是真机运行
658浏览 • 1回复 待解决
HarmonyOS 真机运行提供rn demo sampleProject 报无apps连接
516浏览 • 1回复 待解决
HarmonyOS RN侧使用react-native-permissions问题
376浏览 • 1回复 待解决
HarmonyOS react-native-reconnecting-websocket 报错
463浏览 • 1回复 待解决
Native侧如何引入头文件deviceinfo.h
2566浏览 • 1回复 待解决
HarmonyOS react-native-image-crop-picker引入后,找不到
608浏览 • 1回复 待解决
native侧如何跟ArkTS侧子线程通信
464浏览 • 1回复 待解决
检查CMakeLists.txt里,add_subdirectory后面的路径,如果直接复制的文档内容,${OH_MODULES} 要确保正确定义,检查一下它的名字和路径。
建议切换程CAPI版本:https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-svg-capi.md
ArkTS版本记得将SVG_VIEW_TYPE_NAME加到ArkTSComponentNames参数里。