cli icon indicating copy to clipboard operation
cli copied to clipboard

Android build fails when setting "newArchEnabled" to true

Open mgulfam0722 opened this issue 11 months ago • 18 comments

Environment

info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.19045
  CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700
  Memory: 16.20 GB / 31.75 GB
Binaries:
  Node:
    version: 22.14.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 10.9.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-242.23726.103.2422.13103373
  Visual Studio: Not Found
Languages:
  Java: 17.0.14
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.0
    wanted: 0.78.0
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Description

When I set the newArchEnabled to true, the android build fails.

* What went wrong:
Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\My Computer\Desktop\MyAppCli\android\app\.cxx\Debug\6i5q1k3o\arm64-v8a'

C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\My Computer\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^
        -C ^
        "C:\\Users\\My Computer\\Desktop\\MyAppCli\\android\\app\\.cxx\\Debug\\6i5q1k3o\\arm64-v8a" ^
        appmodules
    from C:\Users\My Computer\Desktop\MyAppCli\android\app

Reproducible Demo

Just initialized a new project using the command npx @react-native-community/cli@latest init MyApp and the android build fails. Surprisingly when newArchEnabled is set to false, the build succeeds. Why is this so?

mgulfam0722 avatar Mar 05 '25 10:03 mgulfam0722

@mgulfam0722 What's the error?

szymonrybczak avatar Mar 05 '25 10:03 szymonrybczak

@mgulfam0722 What's the error?

Sorry, forgot to mention that, updated the issue description, should be visible there. Thanks

mgulfam0722 avatar Mar 05 '25 10:03 mgulfam0722

@mgulfam0722 that's the error with your setup, it's not related to CLI

szymonrybczak avatar Mar 05 '25 11:03 szymonrybczak

@mgulfam0722 that's the error with your setup, it's not related to CLI

Thank you for your response. I have rechecked each and everything as per the documentation but nothing unusual was found. The app builds without any problem when newArchEnabled is set to false.

mgulfam0722 avatar Mar 07 '25 06:03 mgulfam0722

Even expo managed apps work perfectly when setting "newArchEnabled": true

mgulfam0722 avatar Mar 14 '25 04:03 mgulfam0722

Still facing this issue on Windows. Initialized a new project using the command npx @react-native-community/cli@latest init TestApp with newArchEnabled set to true by default in ./android/gradle.properties and the build fails, this is the case when no modifications are made, its a brand new cli project! Below is the error.

> [email protected] android
> react-native run-android

info A dev server is already running for this project on port 8081.
info Installing the app...
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Task :app:buildCMakeDebug[arm64-v8a] FAILED
C/C++: ninja: Entering directory `C:\Users\AG Computers\Desktop\TestApp\android\app\.cxx\Debug\6f505x19\arm64-v8a'
C/C++: ld.lld: error: undefined symbol: std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>::basic_string(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)
C/C++: >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
C/C++: >>> referenced by OnLoad.cpp:107 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:107)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::javaModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&))
C/C++: ld.lld: error: undefined symbol: std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>::~basic_string()
C/C++: >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
C/C++: >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
C/C++: >>> referenced by OnLoad.cpp:107 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:107)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::javaModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&))
C/C++: >>> referenced 1 more times
C/C++: ld.lld: error: undefined symbol: std::__ndk1::__shared_weak_count::__release_weak()
C/C++: >>> referenced by shared_ptr.h:184 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__memory/shared_ptr.h:184)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__shared_weak_count::__release_shared[abi:ne180000]())       
C/C++: ld.lld: error: undefined symbol: operator delete(void*)
C/C++: >>> referenced by function.h:250 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__functional/function.h:250)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__function::__func<JNI_OnLoad::$_0, std::__ndk1::allocator<JNI_OnLoad::$_0>, void ()>::~__func())
C/C++: >>> referenced by new:280 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:280)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void std::__ndk1::__libcpp_operator_delete[abi:ne180000]<void*>(void*))   
C/C++: >>> referenced by function.h:250 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__functional/function.h:250)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>::~__func())
C/C++: >>> referenced 2 more times
C/C++: ld.lld: error: undefined symbol: __cxa_allocate_exception
C/C++: >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
C/C++: ld.lld: error: undefined symbol: std::bad_array_new_length::bad_array_new_length()
C/C++: >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
C/C++: ld.lld: error: undefined symbol: std::bad_array_new_length::~bad_array_new_length()
C/C++: >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
C/C++: >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
C/C++: ld.lld: error: undefined symbol: __cxa_throw
C/C++: >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
C/C++: ld.lld: error: undefined symbol: operator new(unsigned long, std::align_val_t)
C/C++: >>> referenced by new:271 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:271)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void* std::__ndk1::__libcpp_operator_new[abi:ne180000]<unsigned long, std::align_val_t>(unsigned long, std::align_val_t))
C/C++: ld.lld: error: undefined symbol: operator new(unsigned long)
C/C++: >>> referenced by new:271 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:271)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void* std::__ndk1::__libcpp_operator_new[abi:ne180000]<unsigned long>(unsigned long))
C/C++: ld.lld: error: undefined symbol: __cxa_begin_catch
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(__clang_call_terminate)
C/C++: ld.lld: error: undefined symbol: std::terminate()
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(__clang_call_terminate)
C/C++: ld.lld: error: undefined symbol: operator delete(void*, std::align_val_t)
C/C++: >>> referenced by new:280 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:280)
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void std::__ndk1::__libcpp_operator_delete[abi:ne180000]<void*, std::align_val_t>(void*, std::align_val_t))
C/C++: ld.lld: error: undefined symbol: vtable for __cxxabiv1::__class_type_info
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<void ()>)
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>)
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>)
C/C++: >>> referenced 2 more times
C/C++: >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)  
C/C++: ld.lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<JNI_OnLoad::$_0, std::__ndk1::allocator<JNI_OnLoad::$_0>, void ()>)
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>)
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>)
C/C++: >>> referenced 1 more times
C/C++: >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)  
C/C++: ld.lld: error: undefined symbol: __cxa_pure_virtual
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>)
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>)
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>)
C/C++: >>> referenced 25 more times
C/C++: ld.lld: error: undefined symbol: vtable for __cxxabiv1::__function_type_info
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&))
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for void (std::__ndk1::shared_ptr<facebook::react::ComponentDescriptorProviderRegistry const>))
C/C++: >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)  
C/C++: ld.lld: error: undefined symbol: vtable for __cxxabiv1::__pointer_type_info
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&))
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for void (*)(std::__ndk1::shared_ptr<facebook::react::ComponentDescriptorProviderRegistry const>))
C/C++: >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)  
C/C++: ld.lld: error: undefined symbol: __gxx_personality_v0
C/C++: >>> referenced by OnLoad.cpp
C/C++: >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(DW.ref.__gxx_personality_v0)
C/C++: CLANG_~1: error: linker command failed with exit code 1 (use -v to see invocation)
C/C++: ninja: build stopped: subcommand failed.

[Incubating] Problems report is available at: file:///C:/Users/AG%20Computers/Desktop/TestApp/android/build/reports/problems/problems-report.html

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

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

For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
37 actionable tasks: 4 executed, 33 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about 
doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\AG Computers\Desktop\TestApp\android\app\.cxx\Debug\6f505x19\arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/1] Linking CXX shared library "C:\Users\AG Computers\Desktop\TestApp\android\app\build\intermediates\cxx\Debug\6f505x19\obj\arm64-v8a\libappmodules.so"
  FAILED: C:/Users/AG Computers/Desktop/TestApp/android/app/build/intermediates/cxx/Debug/6f505x19/obj/arm64-v8a/libappmodules.so
  cmd.exe /C "cd . && C:\Users\AGCOMP~1\AppData\Local\Android\Sdk\ndk\271~1.122\TOOLCH~1\llvm\prebuilt\WINDOW~1\bin\CLANG_~1.EXE --target=aarch64-none-linux-android24 --sysroot="C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot" -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D__BIONIC_NO_PAGE_SIZE_MACRO -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -fno-limit-debug-info  -Wl,-z,max-page-size=16384 -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libappmodules.so -o "C:\Users\AG Computers\Desktop\TestApp\android\app\build\intermediates\cxx\Debug\6f505x19\obj\arm64-v8a\libappmodules.so" 
CMakeFiles/appmodules.dir/C_/Users/AG_Computers/Desktop/TestApp/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o CMakeFiles/appmodules.dir/OnLoad.cpp.o  "C:/Users/AG Computers/.gradle/caches/8.13/transforms/72cde7dc85b5006383f56c98fcfedfa5/transformed/fbjni-0.7.0/prefab/modules/fbjni/libs/android.arm64-v8a/libfbjni.so"  "C:/Users/AG Computers/.gradle/caches/8.13/transforms/8cb416b8178cb0e7f140959230f7f0bf/transformed/react-android-0.79.2-debug/prefab/modules/jsi/libs/android.arm64-v8a/libjsi.so"  "C:/Users/AG Computers/.gradle/caches/8.13/transforms/8cb416b8178cb0e7f140959230f7f0bf/transformed/react-android-0.79.2-debug/prefab/modules/reactnative/libs/android.arm64-v8a/libreactnative.so"  -latomic -lm && cd ."
  ld.lld: error: undefined symbol: std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>::basic_string(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)
  >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
  >>> referenced by OnLoad.cpp:107 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:107)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::javaModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&))

  ld.lld: error: undefined symbol: std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>::~basic_string()
  >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
  >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
  >>> referenced by OnLoad.cpp:107 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:107)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::javaModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&))
  >>> referenced 1 more times

  ld.lld: error: undefined symbol: std::__ndk1::__shared_weak_count::__release_weak()
  >>> referenced by shared_ptr.h:184 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__memory/shared_ptr.h:184)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__shared_weak_count::__release_shared[abi:ne180000]())

  ld.lld: error: undefined symbol: operator delete(void*)
  >>> referenced by function.h:250 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__functional/function.h:250)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__function::__func<JNI_OnLoad::$_0, std::__ndk1::allocator<JNI_OnLoad::$_0>, void ()>::~__func())
  >>> referenced by new:280 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:280)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void std::__ndk1::__libcpp_operator_delete[abi:ne180000]<void*>(void*))        
  >>> referenced by function.h:250 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__functional/function.h:250)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>::~__func())
  >>> referenced 2 more times

  ld.lld: error: undefined symbol: __cxa_allocate_exception
  >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())

  ld.lld: error: undefined symbol: std::bad_array_new_length::bad_array_new_length()
  >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())

  ld.lld: error: undefined symbol: std::bad_array_new_length::~bad_array_new_length()
  >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
  >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())

  ld.lld: error: undefined symbol: __cxa_throw
  >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())

  ld.lld: error: undefined symbol: operator new(unsigned long, std::align_val_t)
  >>> referenced by new:271 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:271)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void* std::__ndk1::__libcpp_operator_new[abi:ne180000]<unsigned long, std::align_val_t>(unsigned long, std::align_val_t))

  ld.lld: error: undefined symbol: operator new(unsigned long)
  >>> referenced by new:271 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:271)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void* std::__ndk1::__libcpp_operator_new[abi:ne180000]<unsigned long>(unsigned 
long))

  ld.lld: error: undefined symbol: __cxa_begin_catch
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(__clang_call_terminate)

  ld.lld: error: undefined symbol: std::terminate()
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(__clang_call_terminate)

  ld.lld: error: undefined symbol: operator delete(void*, std::align_val_t)
  >>> referenced by new:280 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:280)
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void std::__ndk1::__libcpp_operator_delete[abi:ne180000]<void*, std::align_val_t>(void*, std::align_val_t))

  ld.lld: error: undefined symbol: vtable for __cxxabiv1::__class_type_info
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<void ()>)
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>)
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>)
  >>> referenced 2 more times
  >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)       

  ld.lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<JNI_OnLoad::$_0, std::__ndk1::allocator<JNI_OnLoad::$_0>, void ()>)
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>)
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>)
  >>> referenced 1 more times
  >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)       

  ld.lld: error: undefined symbol: __cxa_pure_virtual
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>)
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>)
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>)
  >>> referenced 25 more times

  ld.lld: error: undefined symbol: vtable for __cxxabiv1::__function_type_info
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&))
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for void (std::__ndk1::shared_ptr<facebook::react::ComponentDescriptorProviderRegistry const>))
  >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)       

  ld.lld: error: undefined symbol: vtable for __cxxabiv1::__pointer_type_info
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&))
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams 
const&))
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for void (*)(std::__ndk1::shared_ptr<facebook::react::ComponentDescriptorProviderRegistry const>))
  >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)       

  ld.lld: error: undefined symbol: __gxx_personality_v0
  >>> referenced by OnLoad.cpp
  >>>               CMakeFiles/appmodules.dir/OnLoad.cpp.o:(DW.ref.__gxx_personality_v0)
  CLANG_~1: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

  C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\AG Computers\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^
        -C ^
        "C:\\Users\\AG Computers\\Desktop\\TestApp\\android\\app\\.cxx\\Debug\\6f505x19\\arm64-v8a" ^
        appmodules
    from C:\Users\AG Computers\Desktop\TestApp\android\app

* 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 17s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'. > com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\AG Computers\Desktop\TestApp\android\app\.cxx\Debug\6f505x19\arm64-v8a' [0/2] Re-checking globbed directories... [1/1] Linking CXX shared library "C:\Users\AG Computers\Desktop\TestApp\android\app\build\intermediates\cxx\Debug\6f505x19\obj\arm64-v8a\libappmodules.so" FAILED: C:/Users/AG Computers/Desktop/TestApp/android/app/build/intermediates/cxx/Debug/6f505x19/obj/arm64-v8a/libappmodules.so cmd.exe /C "cd . && C:\Users\AGCOMP~1\AppData\Local\Android\Sdk\ndk\271~1.122\TOOLCH~1\llvm\prebuilt\WINDOW~1\bin\CLANG_~1.EXE --target=aarch64-none-linux-android24 --sysroot="C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot" -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D__BIONIC_NO_PAGE_SIZE_MACRO -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -Wl,-z,max-page-size=16384 -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libappmodules.so -o "C:\Users\AG Computers\Desktop\TestApp\android\app\build\intermediates\cxx\Debug\6f505x19\obj\arm64-v8a\libappmodules.so" CMakeFiles/appmodules.dir/C_/Users/AG_Computers/Desktop/TestApp/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o CMakeFiles/appmodules.dir/OnLoad.cpp.o "C:/Users/AG Computers/.gradle/caches/8.13/transforms/72cde7dc85b5006383f56c98fcfedfa5/transformed/fbjni-0.7.0/prefab/modules/fbjni/libs/android.arm64-v8a/libfbjni.so" "C:/Users/AG Computers/.gradle/caches/8.13/transforms/8cb416b8178cb0e7f140959230f7f0bf/transformed/react-android-0.79.2-debug/prefab/modules/jsi/libs/android.arm64-v8a/libjsi.so" "C:/Users/AG Computers/.gradle/caches/8.13/transforms/8cb416b8178cb0e7f140959230f7f0bf/transformed/react-android-0.79.2-debug/prefab/modules/reactnative/libs/android.arm64-v8a/libreactnative.so" -latomic -lm && cd ." ld.lld: error: undefined symbol: std::__ndk1::basic_string<char, 
std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>::basic_string(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&) >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)) >>> referenced by OnLoad.cpp:107 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:107) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::javaModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)) ld.lld: error: undefined symbol: std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>::~basic_string() >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)) >>> referenced by OnLoad.cpp:75 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:75) 
>>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::cxxModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)) >>> referenced by OnLoad.cpp:107 (C:/Users/AG Computers/Desktop/TestApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:107) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(facebook::react::javaModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)) >>> referenced 1 more times ld.lld: error: undefined symbol: std::__ndk1::__shared_weak_count::__release_weak() >>> referenced by shared_ptr.h:184 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__memory/shared_ptr.h:184) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__shared_weak_count::__release_shared[abi:ne180000]()) ld.lld: error: undefined symbol: operator delete(void*) >>> referenced by function.h:250 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__functional/function.h:250) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__function::__func<JNI_OnLoad::$_0, std::__ndk1::allocator<JNI_OnLoad::$_0>, void ()>::~__func()) >>> referenced by new:280 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:280) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void std::__ndk1::__libcpp_operator_delete[abi:ne180000]<void*>(void*)) >>> referenced by function.h:250 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__functional/function.h:250) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>::~__func()) >>> referenced 2 more times ld.lld: error: undefined symbol: __cxa_allocate_exception >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]()) ld.lld: error: undefined symbol: std::bad_array_new_length::bad_array_new_length() >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]()) ld.lld: error: undefined symbol: std::bad_array_new_length::~bad_array_new_length() >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]()) >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]()) ld.lld: error: undefined symbol: __cxa_throw >>> referenced by new:174 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]()) ld.lld: error: undefined symbol: operator new(unsigned long, std::align_val_t) >>> referenced by new:271 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:271) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void* std::__ndk1::__libcpp_operator_new[abi:ne180000]<unsigned long, std::align_val_t>(unsigned long, std::align_val_t)) ld.lld: error: undefined symbol: operator new(unsigned long) >>> referenced by new:271 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:271) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void* std::__ndk1::__libcpp_operator_new[abi:ne180000]<unsigned long>(unsigned long)) ld.lld: error: undefined symbol: __cxa_begin_catch >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(__clang_call_terminate) ld.lld: error: undefined symbol: std::terminate() >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(__clang_call_terminate) ld.lld: error: undefined symbol: operator delete(void*, std::align_val_t) >>> referenced by new:280 (C:/Users/AG Computers/AppData/Local/Android/Sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:280) >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(void std::__ndk1::__libcpp_operator_delete[abi:ne180000]<void*, std::align_val_t>(void*, std::align_val_t)) ld.lld: error: undefined symbol: 
vtable for __cxxabiv1::__class_type_info >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<void ()>) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__base<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>) >>> referenced 2 more times >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction) ld.lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<JNI_OnLoad::$_0, std::__ndk1::allocator<JNI_OnLoad::$_0>, void ()>) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::__function::__func<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&), std::__ndk1::allocator<std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>, std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)>) >>> referenced 1 more times >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction) ld.lld: error: undefined symbol: __cxa_pure_virtual >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(vtable for std::__ndk1::__function::__base<void ()>) >>> referenced 25 more times ld.lld: error: undefined symbol: vtable for __cxxabiv1::__function_type_info >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for void (std::__ndk1::shared_ptr<facebook::react::ComponentDescriptorProviderRegistry const>)) >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction) ld.lld: error: undefined symbol: vtable for __cxxabiv1::__pointer_type_info >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)) >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for std::__ndk1::shared_ptr<facebook::react::TurboModule> (*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::react::JavaTurboModule::InitParams const&)) 
>>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(typeinfo for void (*)(std::__ndk1::shared_ptr<facebook::react::ComponentDescriptorProviderRegistry const>)) >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction) ld.lld: error: undefined symbol: __gxx_personality_v0 >>> referenced by OnLoad.cpp >>> CMakeFiles/appmodules.dir/OnLoad.cpp.o:(DW.ref.__gxx_personality_v0) CLANG_~1: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. C++ build system [build] failed while executing: @echo off "C:\\Users\\AG Computers\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^ -C ^ "C:\\Users\\AG Computers\\Desktop\\TestApp\\android\\app\\.cxx\\Debug\\6f505x19\\arm64-v8a" ^ appmodules from C:\Users\AG Computers\Desktop\TestApp\android\app * 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 17s.
info Run CLI with --verbose flag for more details.

There is no error when initializing an Expo project with newArchEnabled set to true.

mgulfam0722 avatar May 08 '25 05:05 mgulfam0722

Anyone facing this issue, here is a temporary fix, just downgrade targetSdkVersion & ndkVersion inside your ./android/build.gradle.

Image

Anyways, the root cause of this error still remain unknown. The versions previously installed were shipped with brand new CLI projects, don't know what caused the errors in the first place. This error only pops up on Windows OS. CLI projects work just fine on MacOS.

Your welcome

mgulfam0722 avatar May 08 '25 07:05 mgulfam0722

There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.

github-actions[bot] avatar Aug 07 '25 04:08 github-actions[bot]

Anyone facing this issue, here is a temporary fix, just downgrade targetSdkVersion & ndkVersion inside your ./android/build.gradle.

Image

Anyways, the root cause of this error still remain unknown. The versions previously installed were shipped with brand new CLI projects, don't know what caused the errors in the first place. This error only pops up on Windows OS. CLI projects work just fine on MacOS.

Your welcome

  • This error depends on the SDK version that you have installed through Android Studio and the react-native version your project uses.
  • And also latest react-native version uses the latest SDK version.
  • If you want to use specific SDK version then you have to try with specific react-native version which is compatible

I-am-Pritam-20 avatar Aug 09 '25 15:08 I-am-Pritam-20

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/shreyachauhan/Desktop/payPenny/paypenny-mobile-app/node_modules/@react-native-clipboard/clipboard/android/build.gradle' line: 60

* What went wrong:
A problem occurred evaluating project ':react-native-clipboard_clipboard'.
> Plugin with id 'com.facebook.react' not found.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-clipboard_clipboard'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

* 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.
==============================================================================

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

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

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1s

as i turn the flag newArchEnabled I'm getting the above error for a lot of libraries. but it runs fine when the flag is false

i have my plugin defined like this in my android/app/build.gradle


plugins {
    id "com.facebook.react"
}

shreyaChauhan300903 avatar Oct 07 '25 06:10 shreyaChauhan300903

  • The package you are using react-native-clipboard_clipboard may be outdated or using some older react or react-native or older SDK of android.
  • The newArchEnable = true is supposed to target Android SDK 34 or higher.
  • Also check for the minSdkVersion, maxSdkVersion, targetSdkVersion, compileSdkVersion options in your build.gradle. Check for the ndk compatibility as well.

Also I could not find the react-native-clipboard_clipboard package in npm. Try providing correct name of the package if possible so that some resolution can be done. 🙂.

I-am-Pritam-20 avatar Oct 07 '25 08:10 I-am-Pritam-20

The package is @react-native-clipboard/clipboard

it is not the only package causing issue, a lot of other packages are also causing issue

ext {
        buildToolsVersion = "35.0.0"
        minSdkVersion = 24
        compileSdkVersion = 35
        targetSdkVersion = 35
        ndkVersion = "28.2.13676358"
        kotlinVersion = "2.0.21"
        androidToolsVersion = "8.6.1"
    }

shreyaChauhan300903 avatar Oct 07 '25 09:10 shreyaChauhan300903

Try that ndk version with 27.1.x or 26.1.x. And also try hermesEnabled = false

I-am-Pritam-20 avatar Oct 07 '25 10:10 I-am-Pritam-20

Did the changes you suggested @I-am-Pritam-20 , but the build is still failing

if (isNewArchitectureEnabled()) {
    apply plugin: 'com.facebook.react'
}

this is the part in every library where it fails


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/shreyachauhan/Desktop/payPenny/paypenny-mobile-app/node_modules/react-native-blob-util/android/build.gradle' line: 43

* What went wrong:
A problem occurred evaluating project ':react-native-blob-util'.
> Plugin with id 'com.facebook.react' not found.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-blob-util'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

* 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.
==============================================================================

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

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

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 10s

shreyaChauhan300903 avatar Oct 07 '25 10:10 shreyaChauhan300903

Did the changes you suggested @I-am-Pritam-20 , but the build is still failing

if (isNewArchitectureEnabled()) {
    apply plugin: 'com.facebook.react'
}

this is the part in every library where it fails


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/shreyachauhan/Desktop/payPenny/paypenny-mobile-app/node_modules/react-native-blob-util/android/build.gradle' line: 43

* What went wrong:
A problem occurred evaluating project ':react-native-blob-util'.
> Plugin with id 'com.facebook.react' not found.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-blob-util'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

* 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.
==============================================================================

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

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

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 10s

Did you remove the compileSdkVersion from build.gradle ? By mistake? . Else try cleaning and rebuilding the project. Remove node modules, package-lock.json, then reinstall all the npm packages again. And then clean with gradle clean, and do run-android again

I-am-Pritam-20 avatar Oct 07 '25 10:10 I-am-Pritam-20

@I-am-Pritam-20 compileSdkVersion is still present, I tried a clean build as you suggested but did not work, got the same error

shreyaChauhan300903 avatar Oct 07 '25 11:10 shreyaChauhan300903

Then there are 3 options left.

  1. Code review or error solve by AI -> means DIY
  2. Wait for response from the maintainers .
  3. Code review along with project building review by some other developer. If don't want to show your codes then only other 2 options 😁

I-am-Pritam-20 avatar Oct 07 '25 11:10 I-am-Pritam-20

is there any update ? are we going to fix this issue ?

rahulvageriya avatar Oct 17 '25 08:10 rahulvageriya