androidreact-nativecmakemetro-bundler

I got Execution failed for task ':app:configureCMakeDebug[arm64-v8a]' while building my react native app


The app was working fine yesterday, but now it gives me this error :

Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
> [CXX1429] error when building with cmake using C:\{my path}\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt: -- The C compiler identification is Clang 14.0.6
  -- The CXX compiler identification is Clang 14.0.6
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/{my path}/AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/{my path}/AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring incomplete, errors occurred!
  See also "C:/{my path}/android/app/.cxx/Debug/5o3yy2s5/arm64-v8a/CMakeFiles/CMakeOutput.log".

......
  CMake Error at C:{my path}/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:6 (add_subdirectory):
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    C:{my path}/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:123 (include)
    CMakeLists.txt:31 (include)


  CMake Error at C:{my path}/PFE-AssistiveBanking-RN/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory):
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    C:{my path}/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:123 (include)
    CMakeLists.txt:31 (include)


  CMake Error at C:{my path}/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:8 (add_subdirectory):
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    C:{my path}/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:123 (include)
    CMakeLists.txt:31 (include)


  CMake Error at C:{my path}/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:9 (add_subdirectory):
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    C:{my path}/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:123 (include)
    CMakeLists.txt:31 (include)


  CMake Error at C:{my path}/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:10 (add_subdirectory):        
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    C:{my path}/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:123 (include)
    CMakeLists.txt:31 (include)


  CMake Error at C:{my path}/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:11 (add_subdirectory):        
    add_subdirectory called with incorrect number of arguments
  Call Stack (most recent call first):
    C:{my path}/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:123 (include)
    CMakeLists.txt:31 (include)


  CMake Error at C:/{my path}/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:126 (target_link_libraries):
    Cannot specify link libraries for target
    "react_codegen_RNDateTimePickerCGen" which is not built by this project.
  Call Stack (most recent call first):
    CMakeLists.txt:31 (include)

Has anyone encountered this and found how to fix the issue, I am in dire help

I tried using yarn start --reset-cache and .\gradlew clean , i also tried degrading the cmake version from android studio but it didn't work, to top it off when the emulator runs for the first time , it opens many consecutive android error dialogues android emulator error dialogue


Solution

  • I was having same issue like this for react native screens Task :react-native-reanimated:configureCMakeDebug[arm64-v8a]

    I just uninstalled react native screens and then installed lower version of it which was compatible with my project, then it worked.