-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execution failed for task ':react-native:ReactAndroid:hermes-engine:configureBuildForHermes'. #37780
Comments
|
the issue still exist even after upgrading |
Closing as this is a duplicate of #37770 Are you attempting to do a build from source on Windows (seems like according to those lines)? That's currently not supported. You would have to use a Mac or Linux machine for this. Also please open the issue on the project you cloned, as they should not be using the build from source (so you can easily build on Windows). |
Hi there! Jumping in on this because my ticket was tagged in this one. I know you're using Windows because you're getting the same error I was on Monday. The reason you're getting an error with I don't think this commit was checked properly before merging, as what this fails to note is that you MUST have the location of nmake specified in your Windows PATH environment variables, as well as having MSVC installed via the Visual Studio Installer. This also doesn't work anyway, I'm just telling you how to get to the same stage as me. Open your Visual Studio installer via the start menu. Make sure you have "MSVC v143 - VS 2022 C++ etc......" installed. You can see what it looks like here: Next, open up your environment variables on Windows (I assume you know how to do this) and in your user variables (NOT your system ones!), highlight the "Path" variable, then click the "Edit..." button. You should then add the line that points to where the newly-installed Just make sure you swap out After doing that, you should then get a report that your C / CXX compiler is broken, and that it cannot compile a simple test program. That's the same error that I'm getting here: #37770 So at least you're at the same stage as I am in all of this. To Summarize:
Ideally it'd be great if the guy that made the change to use |
Just to be clear, we are aware that build from source on windows is broken since several years for a number of reasons. In general, build from source is not recommended for the average user (see here why https://reactnative.dev/contributing/how-to-build-from-source#rationale) If you build on Windows and disable build from source, everything should work flawlessly, that's where we focus our support. Those commits that you're referencing are specifically aimed at fixing those scenarios. We are an extremely small team and we all build on MacOS and Linux machines. We're happy to receive a PR that will unblock the situation though. |
That's fair enough; unfortunately our team needs to build from source due to the reasons mentioned in the PR I've recently created. Fortunately, if that gets merged in, we don't need to worry about building from source at all! :) It would also be much appreciated if there was some kind of warning on the build from source page which highlights / warns Windows users of the difficulty of a source build on their OS at this current time; would probably help cut down on duplicate tickets too. Thanks for all your help these last couple of days cortinico! |
Yup we should add a banner on the page that Windows is currently not supported |
Hi @abhishekjmd, can you confirm that you have the "MSVC VS C++ x64/86 Build Tools" installed via Visual Studio for me please? You can double-check this via the Visual Studio installer, making sure you have the module installed that I have circled in red above this post. If you do have this installed, could you check that you have the "Developer Command Prompt for VS 2022" command line via your Start Menu? If you have it, please run it as administrator, and |
Description
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.
Execution failed for task ':react-native:ReactAndroid:hermes-engine:configureBuildForHermes'.
BUILD FAILED in 29m 47s
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 Version
0.71.7
Output of
npx react-native info
warn Package react-native-math-view contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the packa
ge maintainers about this.
warn Package react-native-notifications contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the p
ackage maintainers about this.
warn Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintai
ners about this.
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
Memory: 753.30 MB / 7.90 GB
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.6.5 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
Android NDK: 22.1.7171670
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
IDEs:
Android Studio: AI-222.4459.24.2221.10121639
Visual Studio: Not Found
Languages:
Java: 11.0.14.1
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.7 => 0.71.7
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
I cloned a project https://github.com/RocketChat/Rocket.Chat.ReactNative.git
did yarn install and then yarn android then got this error
Snack, code example, screenshot, or link to a repository
https://github.com/RocketChat/Rocket.Chat.ReactNative
The text was updated successfully, but these errors were encountered: