Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED React Native New Architecture version 0.69.1

Viewed 547

I am facing issue while assembling the Debug. It works for several points but then It failed on the configuring build for 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".
2 Answers

I found answer finally, basically I am using Ubuntu 20.04 and I don't have ICU components so If you are using ubuntu then you have to install the icu components by the following ways below

git clone https://github.com/unicode-org/icu
cd icu/icu4c
cd source
./configure --prefix=/usr 
make
sudo make install

Then you might can end up with this problem like Task :ReactAndroid:hermes-engine:buildCMakeRelease[arm64-v8a][libhermes] FAILED

And for now there is currently open issue related this. Please refer to it ahead https://github.com/facebook/react-native/issues/34084

I got same problem but if fixed that wit install libicu-dev my os is mint 20.3 ubuntu base 20.04

sudo apt -y libicu-dev

and my problem is solved

Related