react-native: Task :ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc] FAILED
Description
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
warn Package react-native-ui-lib contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info JS server already running.
info Installing the app...
> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
F:\font\Project\web-project\GNovel\node_modules\react-native-reanimated\android\react-native-reanimated-70-hermes.aar
> Task :ReactAndroid:downloadBoost UP-TO-DATE
Download https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz
> Task :ReactAndroid:downloadDoubleConversion UP-TO-DATE
Download https://github.com/google/double-conversion/archive/v1.1.6.tar.gz
> Task :ReactAndroid:downloadFmt UP-TO-DATE
Download https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz
> Task :ReactAndroid:downloadFolly UP-TO-DATE
Download https://github.com/facebook/folly/archive/v2021.07.22.00.tar.gz
> Task :ReactAndroid:downloadGlog UP-TO-DATE
Download https://github.com/google/glog/archive/v0.3.5.tar.gz
> Task :ReactAndroid:downloadLibevent UP-TO-DATE
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
> 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
-- Found the following ICU libraries:
-- uc (required)
-- i18n (required)
-- uc (required)
-- The following ICU libraries were not found:
-- data (required)
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR _ICU_REQUIRED_LIBS_FOUND) (Required is at least version "52")
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- CMAKE_HOST_SYSTEM_NAME = Windows
-- CMAKE_SYSTEM_NAME = Windows
-- HERMES_APPLE_TARGET_PLATFORM =
-- CMAKE_CROSSCOMPILING = FALSE
-- Configuring done
<-------------> 5% EXECUTING [28s]
-- Generating done
-- Build files have been written to: F:/font/Project/web-project/GNovel/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes
> Task :ReactAndroid:hermes-engine:buildHermes
[ 3%] Built target LLVHDemangle
[ 30%] Built target LLVHSupport
[ 30%] Built target hermesFrontEndDefs
[ 33%] Built target hermesPlatformUnicode
[ 33%] Built target hermesRegex
[ 36%] Built target dtoa
[ 50%] Built target hermesSupport
[ 53%] Built target hermesAST
[ 56%] Built target hermesParser
[ 63%] Built target hermesFrontend
[ 73%] Built target hermesOptimizer
[ 73%] Built target hermesADT
[ 76%] Built target hermesInst
[ 76%] Built target hermesFlowParser
[ 76%] Built target hermesAST2JS
[ 80%] Built target hermesSourceMap
[ 80%] Built target hermesBackend
[ 93%] Built target hermesHBCBackend
[ 96%] Built target zip
[100%] Built target hermesCompilerDriver
[100%] Built target hermesc
> Task :ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc] FAILED
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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
39 actionable tasks: 13 executed, 26 up-to-date
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.
Using Windows 10 built-in ICU
Warning: NMake does not support parallel builds. Ignoring parallel build command line option.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc]'.
> Build command failed.
Error while executing process F:\font\Software\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\.cxx\Debug\736l5i4g\arm64-v8a fabricjni hermes-executor-debug jscexecutor jsijniprofiler reactnativeblob reactnativejni reactperfloggerjni turbomodulejsijni}
ninja: Entering directory `F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\.cxx\Debug\736l5i4g\arm64-v8a'
[0/2] Re-checking globbed directories...
[1/13] Linking CXX shared library F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\736l5i4g\obj\arm64-v8a\libturbomodulejsijni.so
[2/13] Linking CXX shared library F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\736l5i4g\obj\arm64-v8a\libreact_codegen_rncore.so
[3/13] Linking CXX static library ReactCommon\react\renderer\components\modal\librrc_modal.a
[4/13] Linking CXX static library ReactCommon\react\renderer\components\switch\librrc_switch.a
[5/13] Linking CXX static library ReactCommon\react\renderer\components\slider\librrc_slider.a
[6/13] Building CXX object ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.cpp.o
[7/13] Building CXX object ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o
[8/13] Linking CXX static library ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a
FAILED: ReactCommon/react/renderer/components/progressbar/librrc_progressbar.a
cmd.exe /C "cd . && F:\font\Software\Android\Sdk\cmake\3.18.1\bin\cmake.exe -E rm -f ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a && F:\font\Software\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ar.exe qc ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a @ReactCommon\react\renderer\components\progressbar\CMakeFiles\rrc_progressbar.rsp && F:\font\Software\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ranlib.exe ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a && cd ."
F:\font\Software\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ar.exe: ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o: No such file or directory
[9/13] Building CXX object ReactCommon/react/renderer/textlayoutmanager/CMakeFiles/react_render_textlayoutmanager.dir/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp.o
ninja: build stopped: subcommand failed.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* 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.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 44s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -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.
Using Windows 10 built-in ICU
Warning: NMake does not support parallel builds. Ignoring parallel build command line option.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc]'.
> Build command failed.
Error while executing process F:\font\Software\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\.cxx\Debug\736l5i4g\arm64-v8a fabricjni hermes-executor-debug jscexecutor jsijniprofiler reactnativeblob reactnativejni reactperfloggerjni turbomodulejsijni}
ninja: Entering directory `F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\.cxx\Debug\736l5i4g\arm64-v8a'
[0/2] Re-checking globbed directories...
[1/13] Linking CXX shared library F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\736l5i4g\obj\arm64-v8a\libturbomodulejsijni.so
[2/13] Linking CXX shared library F:\font\Project\web-project\GNovel\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\736l5i4g\obj\arm64-v8a\libreact_codegen_rncore.so
[3/13] Linking CXX static library ReactCommon\react\renderer\components\modal\librrc_modal.a
[4/13] Linking CXX static library ReactCommon\react\renderer\components\switch\librrc_switch.a
[5/13] Linking CXX static library ReactCommon\react\renderer\components\slider\librrc_slider.a
[6/13] Building CXX object ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.cpp.o
[7/13] Building CXX object ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o
[8/13] Linking CXX static library ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a
FAILED: ReactCommon/react/renderer/components/progressbar/librrc_progressbar.a
cmd.exe /C "cd . && F:\font\Software\Android\Sdk\cmake\3.18.1\bin\cmake.exe -E rm -f ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a && F:\font\Software\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ar.exe qc ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a @ReactCommon\react\renderer\components\progressbar\CMakeFiles\rrc_progressbar.rsp && F:\font\Software\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ranlib.exe ReactCommon\react\renderer\components\progressbar\librrc_progressbar.a && cd ."
F:\font\Software\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ar.exe: ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o: No such file or directory
[9/13] Building CXX object ReactCommon/react/renderer/textlayoutmanager/CMakeFiles/react_render_textlayoutmanager.dir/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp.o
ninja: build stopped: subcommand failed.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* 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.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 44s
at makeError (F:\font\Project\web-project\GNovel\node_modules\execa\index.js:174:9)
at F:\font\Project\web-project\GNovel\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (F:\font\Project\web-project\GNovel\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (F:\font\Project\web-project\GNovel\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
Version
0.70.3
Output of npx react-native info
System: OS: Windows 10 10.0.22000 CPU: (12) x64 AMD Ryzen 5 4600H with Radeon Graphics Memory: 4.47 GB / 15.37 GB Binaries: Node: 16.16.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD Watchman: 20220918.223204.0 - C:\ProgramData\chocolatey\bin\watchman.EXE SDKs: Android SDK: API Levels: 28, 31, 33 Build Tools: 30.0.2, 30.0.3, 31.0.0, 33.0.0 System Images: android-31 | Intel x86 Atom_64, android-33 | Google APIs Intel x86 Atom_64 Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio: 17.3.32929.385 (Visual Studio Community 2022) Languages: Java: 11.0.16.1 npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: ^0.70.3 => 0.70.3 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
npx react-native run-android
Snack, code example, screenshot, or link to a repository
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 18 (6 by maintainers)
using
"react-native": "0.71.7"
and getting this error:I also got the same error when I built Android on Window 11 OS.
react-native: 0.72.3 node: 18.16.0
Then, I deleted folder
.cxx
inandroid/app
, and tried again. Then it worked successfullyninja: error: unknown target ‘react_codegen_rngesturehandler_codegen’