react-native: ReactAndroid:hermes-engine:configureBuildForHermes FAILED

New Version

0.70.1

Old Version

0.69.0

Build Target(s)

android

Output of react-native info

System: OS: Windows 10 10.0.19043 CPU: (8) x64 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz Memory: 1.86 GB / 15.75 GB Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - C:\Program Files\nodejs\yarn.CMD npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled IDEs: Android Studio: Not Found Visual Studio: Not Found Languages: Java: 11.0.15 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.1 => 0.70.1 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7

Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED – Configuring incomplete, errors occurred!

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings 24 actionable tasks: 1 executed, 23 up-to-date

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

It worked for me after updating CMAKE on Android Studio: https://stackoverflow.com/a/55991090

I encountered an error while attempting to build and install the app using the ‘yarn android’ command. The error message and relevant details are as follows:

-----------------------------------*******************************************************------------------------------------------------------

Error: Command failed: gradlew.bat app:installExperimentalPlayDebug -PreactNativeDevServerPort=8081 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.

CMake Error at CMakeLists.txt:64 (project): Running

‘nmake’ ‘-?’

failed with:

The system cannot find the file specified

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:react-native:ReactAndroid:hermes-engine:configureBuildForHermes’.

Process ‘command ‘cmd’’ finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

BUILD FAILED in 29m 47s

at makeError (C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\node_modules\execa\index.js:174:9)
at C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7s:82:7)
at async Command.handleAction (C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\ntive\node_modules\@react-native-community\cli\build\index.js:108:9)

info Run CLI with --verbose flag for more details.

-----------------------------------*******************************************************------------------------------------------------------

I have ensured that I have the Android development environment set up following the instructions provided in the React Native documentation. However, the build process encountered the following issues:

Deprecation warning related to policy CMP0026 in CMakeLists.txt. CMake errors related to ‘nmake’ and missing compiler settings (CMAKE_C_COMPILER and CMAKE_CXX_COMPILER). Failure during the task ‘:react-native:ReactAndroid:hermes-engine:configureBuildForHermes’ with a non-zero exit value. I have tried running the command with additional options such as ‘–stacktrace’, ‘–info’, and ‘–debug’, but the error persists.

I would appreciate any assistance in resolving this build error and successfully installing the app. Thank you for your help.

Operating system: 64-bit operating system, x64-based processor Node.js version: v18.16.0 Yarn version: 1.22.19 React Native version: 0.71.7

react-native v0.70.6 and the problem still exists

As mentioned:

This and other problems with Hermes on Windows are going to be fixed in RN 0.71.

So it’s expected that on .70 you still have those build issues with the New Architecture.

Just a small heads up: This and other problems with Hermes on Windows are going to be fixed in RN 0.71.