thecodingmachine / react-native-boilerplate

A React Native template for building solid applications ๐Ÿ™, using JavaScript ๐Ÿ’› or Typescript ๐Ÿ’™ (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.75k stars 864 forks source link

[BUG]: No build apk CMake Error #350

Closed Angelk90 closed 1 year ago

Angelk90 commented 1 year ago

react-native environment setup

Description

I'm having the following problem can't compile.

yarn run v1.22.4
$ react-native run-android
info Starting JS server...
info Installing the app...

> Configure project :react-native-flipper
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

> Configure project :react-native-reanimated
No AAR for react-native-reanimated found. Attempting to build from source.
Android gradle plugin: 7.3.1
Gradle: 7.5.1
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

> Task :app:configureCMakeDebug[arm64-v8a] FAILED
C/C++: CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
C/C++:   An old version of CMake is being used that cannot automatically detect
C/C++:   compiler attributes.  Compiler identification is being bypassed.  Some
C/C++:   values may be wrong or missing.  Update to CMake 3.19 or newer to use
C/C++:   CMake's built-in compiler identification.
C/C++: Call Stack (most recent call first):
C/C++:   /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
C/C++:   /Users/USERNAME/Library/Android/sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
C/C++:   CMakeLists.txt:28 (project)
C/C++: CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
C/C++:   An old version of CMake is being used that cannot automatically detect
C/C++:   compiler attributes.  Compiler identification is being bypassed.  Some
C/C++:   values may be wrong or missing.  Update to CMake 3.19 or newer to use
C/C++:   CMake's built-in compiler identification.
C/C++: Call Stack (most recent call first):
C/C++:   /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)
C/C++: CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
C/C++:   An old version of CMake is being used that cannot automatically detect
C/C++:   compiler attributes.  Compiler identification is being bypassed.  Some
C/C++:   values may be wrong or missing.  Update to CMake 3.19 or newer to use
C/C++:   CMake's built-in compiler identification.
C/C++: Call Stack (most recent call first):
C/C++:   /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)
C/C++: CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:6 (add_subdirectory):
C/C++:   add_subdirectory called with incorrect number of arguments
C/C++: Call Stack (most recent call first):
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
C/C++:   CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory):
C/C++:   add_subdirectory called with incorrect number of arguments
C/C++: Call Stack (most recent call first):
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
C/C++:   CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:8 (add_subdirectory):
C/C++:   add_subdirectory called with incorrect number of arguments
C/C++: Call Stack (most recent call first):
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
C/C++:   CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:9 (add_subdirectory):
C/C++:   add_subdirectory called with incorrect number of arguments
C/C++: Call Stack (most recent call first):
C/C++:   /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
C/C++:   CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:109 (target_link_libraries):
C/C++:   Cannot specify link libraries for target
C/C++:   "react_codegen_rngesturehandler_codegen" which is not built by this
C/C++:   project.
C/C++: Call Stack (most recent call first):
C/C++:   CMakeLists.txt:31 (include)
152 actionable tasks: 8 executed, 144 up-to-date

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
> [CXX1405] error when building with cmake using /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - 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: /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring incomplete, errors occurred!
  See also "/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeOutput.log".

  C++ build system [configure] failed while executing:
      /Users/USERNAME/Library/Android/sdk/cmake/3.18.1/bin/cmake \
        "-H/Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup" \
        -DCMAKE_SYSTEM_NAME=Android \
        -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
        -DCMAKE_SYSTEM_VERSION=21 \
        -DANDROID_PLATFORM=android-21 \
        -DANDROID_ABI=arm64-v8a \
        -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
        -DANDROID_NDK=/Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620 \
        -DCMAKE_ANDROID_NDK=/Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620 \
        -DCMAKE_TOOLCHAIN_FILE=/Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake \
        -DCMAKE_MAKE_PROGRAM=/Users/USERNAME/Library/Android/sdk/cmake/3.18.1/bin/ninja \
        "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/intermediates/cxx/Debug/3g1p4s6v/obj/arm64-v8a" \
        "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/intermediates/cxx/Debug/3g1p4s6v/obj/arm64-v8a" \
        -DCMAKE_BUILD_TYPE=Debug \
        "-DCMAKE_FIND_ROOT_PATH=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/prefab/arm64-v8a/prefab" \
        "-B/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a" \
        -GNinja \
        "-DPROJECT_BUILD_DIR=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build" \
        "-DREACT_ANDROID_DIR=/Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid" \
        -DANDROID_STL=c++_shared
    from /Users/USERNAME/Desktop/prova reactnative/apkT/android/app
  CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
    /Users/USERNAME/Library/Android/sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
    CMakeLists.txt:28 (project)

  CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)

  CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/android/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:109 (target_link_libraries):
    Cannot specify link libraries for target
    "react_codegen_rngesturehandler_codegen" which is not built by this
    project.
  Call Stack (most recent call first):
    CMakeLists.txt:31 (include)

* 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 9s

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 app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
> [CXX1405] error when building with cmake using /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - 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: /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring incomplete, errors occurred!
  See also "/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeOutput.log".

  C++ build system [configure] failed while executing:
      /Users/USERNAME/Library/Android/sdk/cmake/3.18.1/bin/cmake \
        "-H/Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup" \
        -DCMAKE_SYSTEM_NAME=Android \
        -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
        -DCMAKE_SYSTEM_VERSION=21 \
        -DANDROID_PLATFORM=android-21 \
        -DANDROID_ABI=arm64-v8a \
        -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
        -DANDROID_NDK=/Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620 \
        -DCMAKE_ANDROID_NDK=/Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620 \
        -DCMAKE_TOOLCHAIN_FILE=/Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake \
        -DCMAKE_MAKE_PROGRAM=/Users/USERNAME/Library/Android/sdk/cmake/3.18.1/bin/ninja \
        "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/intermediates/cxx/Debug/3g1p4s6v/obj/arm64-v8a" \
        "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build/intermediates/cxx/Debug/3g1p4s6v/obj/arm64-v8a" \
        -DCMAKE_BUILD_TYPE=Debug \
        "-DCMAKE_FIND_ROOT_PATH=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/prefab/arm64-v8a/prefab" \
        "-B/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a" \
        -GNinja \
        "-DPROJECT_BUILD_DIR=/Users/USERNAME/Desktop/prova reactnative/apkT/android/app/build" \
        "-DREACT_ANDROID_DIR=/Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid" \
        -DANDROID_STL=c++_shared
    from /Users/USERNAME/Desktop/prova reactnative/apkT/android/app
  CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
    /Users/USERNAME/Library/Android/sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
    CMakeLists.txt:28 (project)

  CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)

  CMake Warning at /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
    An old version of CMake is being used that cannot automatically detect
    compiler attributes.  Compiler identification is being bypassed.  Some
    values may be wrong or missing.  Update to CMake 3.19 or newer to use
    CMake's built-in compiler identification.
  Call Stack (most recent call first):
    /Users/USERNAME/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
    /Users/USERNAME/Desktop/prova reactnative/apkT/android/app/.cxx/Debug/3g1p4s6v/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/android/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/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):
    /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:106 (include)
    CMakeLists.txt:31 (include)

  CMake Error at /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:109 (target_link_libraries):
    Cannot specify link libraries for target
    "react_codegen_rngesturehandler_codegen" which is not built by this
    project.
  Call Stack (most recent call first):
    CMakeLists.txt:31 (include)

* 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 9s

    at makeError (/Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/execa/index.js:174:9)
    at /Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/execa/index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (/Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:82:7)
    at async Command.handleAction (/Users/USERNAME/Desktop/prova reactnative/apkT/node_modules/@react-native-community/cli/build/index.js:108:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Version

3.6.5

On which OS this issue appear on?

Desktop OS

macOS Ventura 13.2.1

thomaslprr commented 1 year ago

Hi, did you find any solution ?

Thanks in advance

totemo69 commented 1 year ago

Hello,

I've encountered the same issue.

Any work around?

Thank you.

kangfredy commented 1 year ago

this is reanimated issue from react native version hope this developper update to 0.72.0 or downgrade using stable version https://www.npmjs.com/package/react-native?activeTab=versions you can check stable version here but i recomended using 0.69 is stable version as well

MussadiqAli commented 1 year ago

I've fixed the issue by:

  1. created a new simple React Native project with the same name as the name of the Coding Machine project.
  2. deleted the Android folder in the Coding Machine project.
  3. copy the simple project's Android folder and paste it into the Coding Machine project.
  4. gradlew clean
  5. and run the project

Note: in this case, you have to manually add the app icons and splash screen to the Android project