我在装配调试时遇到了问题。它可以工作几个点,但是在配置android的构建时失败了。
> Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED
CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- The following ICU libraries were not found:
-- uc (required)
-- i18n (required)
-- data (required)
-- uc (required)
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR ICU_LIBRARY _ICU_REQUIRED_LIBS_FOUND) (Required is at least version "52")
CMake Error at CMakeLists.txt:520 (message):
Unable to find ICU.
-- Configuring incomplete, errors occurred!
See also "/home/shikari/App Development/WhatScan/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/CMakeFiles/CMakeOutput.log".
See also "/home/shikari/App Development/WhatScan/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/CMakeFiles/CMakeError.log".发布于 2022-07-13 12:09:55
我终于找到了答案,基本上我使用的是Ubuntu20.04,而且我没有ICU组件,所以如果您使用的是Ubuntu,那么您必须通过以下方式安装icu组件
git clone https://github.com/unicode-org/icu
cd icu/icu4c
cd source
./configure --prefix=/usr
make
sudo make install那么您可能会遇到类似于Task :ReactAndroid:hermes-engine:buildCMakeRelease[arm64-v8a][libhermes] FAILED这样的问题。
目前还有一个与此相关的悬而未决的问题。请参阅前面的https://github.com/facebook/react-native/issues/34084
发布于 2022-08-15 14:33:57
我也遇到了同样的问题,但是如果安装libicu-dev,我的os是mint 20.3 ubuntu基地20.04。
sudo apt -y libicu-dev我的问题解决了
https://stackoverflow.com/questions/72937332
复制相似问题