HarmonyOS 鸿蒙Next ReactNative release打包CMake报错
HarmonyOS 鸿蒙Next ReactNative release打包CMake报错 加载bundle正常,尝试使用release包报错,参考教程最后的“release包使用”: https://gitee.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA.md#release%E5%8C%85%E4%BD%BF%E7%94%A8
下面附上各阶段的报错
运行报错一(完全复制教程代码):
> 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 Error: File /Users/eastbuy/DevecostudioProjects/MyRNApplication/entry/oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/folly/CMake/folly-config.h.cmake does not exist.
CMake Error at CMakeLists.txt:65 (configure_file):
configure_file Problem configuring file
Experimental C-API architecture enabled
-- Configuring incomplete, errors occurred!
> hvigor ERROR: BUILD FAILED in 1 s 39 ms
参考描述,将 cmake_minimum_required(VERSION 3.4.1) 版本改为3.5,并移动到第一行,运行报错二:
> hvigor ERROR: Failed :entry:default@BuildNativeWithCmake...
> hvigor ERROR: Exceptions happened while executing: CMake Error: File /Users/eastbuy/DevecostudioProjects/MyRNApplication/entry/oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/folly/CMake/folly-config.h.cmake does not exist.
CMake Error at CMakeLists.txt:65 (configure_file):
configure_file Problem configuring file
Experimental C-API architecture enabled
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
> hvigor ERROR: BUILD FAILED in 1 s 76 ms
看报错内容是folly/CMake/folly-config.h.cmake does not exist.
有大佬解决过release打包报错的问题吗?
更多关于HarmonyOS 鸿蒙Next ReactNative release打包CMake报错的实战教程也可以访问 https://www.itying.com/category-93-b0.html
1 回复