报错:
> 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!
检查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参数里。