Git Product home page Git Product logo

Comments (11)

cortinico avatar cortinico commented on June 22, 2024 1

that happens when the version of React Native and the CLI are not aligned.
Can you share which version of @react-native-community/cli-platform-android you folks have installed?

from cli.

miinos avatar miinos commented on June 22, 2024 1

Looks like you're having different versions of react-native in your projects (that's most likely the root cause of your issue). Why is that the case?

In my package.json, I'm only using the latest version of react-native: 0.74.1

from cli.

MrRefactor avatar MrRefactor commented on June 22, 2024 1

i got the same error here too with latest version - react native: 0.74.1

Task :app:buildCMakeDebug[arm64-v8a]
C/C++: ninja: Entering directory `/Users/Workspace/xx/android/app/.cxx/Debug/h1j1a4m5/arm64-v8a'
C/C++: /Users/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --

I have the same error as above, iOS build running fine.

from cli.

miinos avatar miinos commented on June 22, 2024

same problem on android build with new architecture

from cli.

szymonrybczak avatar szymonrybczak commented on June 22, 2024

cc @cortinico

from cli.

miinos avatar miinos commented on June 22, 2024

Fixed the issue by adding to the package.json file:

"resolutions": {
    "@react-native-community/cli": "13.6.6",
    "@react-native-community/cli-clean": "13.6.6",
    "@react-native-community/cli-config": "13.6.6",
    "@react-native-community/cli-debugger-ui": "13.6.6",
    "@react-native-community/cli-doctor": "13.6.6",
    "@react-native-community/cli-hermes": "13.6.6",
    "@react-native-community/cli-platform-android": "13.6.6",
    "@react-native-community/cli-platform-ios": "13.6.6",
    "@react-native-community/cli-server-api": "13.6.6",
    "@react-native-community/cli-tools": "13.6.6",
    "@react-native-community/cli-types": "13.6.6"
  }

from cli.

szymonrybczak avatar szymonrybczak commented on June 22, 2024

hey @miinos I'm glat that it works for you, however adding resolutions field is not recommended way. If you don't override - what's the version of CLI that you have in project? You can check it by running:

yarn why @react-native-community/cli

from cli.

miinos avatar miinos commented on June 22, 2024

hey @miinos I'm glat that it works for you, however adding resolutions field is not recommended way. If you don't override - what's the version of CLI that you have in project? You can check it by running:

yarn why @react-native-community/cli

without resolutions:

├─ react-native@npm:0.73.6
│  └─ @react-native-community/cli@npm:12.3.6 (via npm:12.3.6)
│
├─ react-native@npm:0.74.1
│  └─ @react-native-community/cli@npm:13.6.6 (via npm:13.6.6)
│
├─ react-native@npm:0.74.1 [51e67]
│  └─ @react-native-community/cli@npm:13.6.6 (via npm:13.6.6)
│
└─ react-native@npm:0.73.6 [eb6a2]
   └─ @react-native-community/cli@npm:12.3.6 (via npm:12.3.6)

with resolutions

├─ react-native@npm:0.73.6
│  └─ @react-native-community/cli@npm:13.6.6 (via npm:13.6.6)
│
├─ react-native@npm:0.74.1
│  └─ @react-native-community/cli@npm:13.6.6 (via npm:13.6.6)
│
├─ react-native@npm:0.74.1 [51e67]
│  └─ @react-native-community/cli@npm:13.6.6 (via npm:13.6.6)
│
└─ react-native@npm:0.73.6 [eb6a2]
   └─ @react-native-community/cli@npm:13.6.6 (via npm:13.6.6)

from cli.

cortinico avatar cortinico commented on June 22, 2024

Looks like you're having different versions of react-native in your projects (that's most likely the root cause of your issue). Why is that the case?

from cli.

szymonrybczak avatar szymonrybczak commented on June 22, 2024

@miinos can you share a repro then, where we can reproduce this issue?

from cli.

tonypangs avatar tonypangs commented on June 22, 2024

i got the same error here too with latest version - react native: 0.74.1

Task :app:buildCMakeDebug[arm64-v8a]
C/C++: ninja: Entering directory `/Users/Workspace/xx/android/app/.cxx/Debug/h1j1a4m5/arm64-v8a'
C/C++: /Users/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android23 --sysroot=/Users/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Dappmodules_EXPORTS -I/Users/Workspace/xx/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup -I/Users/Workspace/xx/android/app/build/generated/rncli/src/main/jni -I/Users/Workspace/xx/node_modules/react-native-safe-area-context/android/src/main/jni -I/Users/Workspace/xx/node_modules/react-native-screens/android/src/main/jni -I/Users/Workspace/xx/node_modules/react-native-svg/android/src/main/jni -I/Users/Workspace/xx/node_modules/@shopify/react-native-skia/android/build/generated/source/codegen/jni/. -I/Users/Workspace/xx/node_modules/@shopify/react-native-skia/android/build/generated/source/codegen/jni/react/renderer/components/rnskia -I/Users/Workspace/xx/node_modules/react-native-date-picker/android/build/generated/source/codegen/jni/. -I/Users/Workspace/xx/node_modules/react-native-date-picker/android/build/generated/source/codegen/jni/react/renderer/components/RNDatePickerSpecs -I/Users/Workspace/xx/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/. -I/Users/Workspace/xx/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/react/renderer/components/rngesturehandler_codegen -I/Users/Workspace/xx/node_modules/react-native-mmkv/android/build/generated/source/codegen/jni/. -I/Users/Workspace/xx/node_modules/react-native-mmkv/android/build/generated/source/codegen/jni/react/renderer/components/reactnativemmkv -I/Users/Workspace/xx/node_modules/react-native-reanimated/android/build/generated/source/codegen/jni/. -I/Users/Workspace/xx/node_modules/react-native-reanimated/android/build/generated/source/codegen/jni/react/renderer/components/rnreanimated -I/Users/Workspace/xx/node_modules/react-native-safe-area-context/android/src/main/jni/. -I/Users/Workspace/xx/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp -I/Users/Workspace/xx/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni -I/Users/Workspace/xx/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext -I/Users/Workspace/xx/node_modules/react-native-screens/android/src/main/jni/. -I/Users/Workspace/xx/node_modules/react-native-screens/android/src/main/jni/../../../../common/cpp -I/Users/Workspace/xx/node_modules/react-native-screens/android/src/main/jni/../../../build/generated/source/codegen/jni -I/Users/Workspace/xx/node_modules/react-native-screens/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/rnscreens -I/Users/Workspace/xx/node_modules/react-native-svg/android/src/main/jni/. -I/Users/Workspace/xx/node_modules/react-native-svg/android/src/main/jni/../../../../common/cpp -I/Users/Workspace/xx/node_modules/react-native-svg/android/src/main/jni/../../../build/generated/source/codegen/jni -I/Users/Workspace/xx/node_modules/react-native-svg/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/rnsvg -I/Users/Workspace/xx/node_modules/react-native-vector-icons/android/build/generated/source/codegen/jni/. -I/Users/Workspace/xx/node_modules/react-native-vector-icons/android/build/generated/source/codegen/jni/react/renderer/components/RNVectorIconsSpec -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/fabricjni/include -isystem /Users/.gradle/caches/transforms-4/c7e26f7d3c2fc1a6636ff1467fc77795/transformed/jetified-fbjni-0.6.0/prefab/modules/fbjni/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/folly_runtime/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/glog/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/jsi/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_codegen_rncore/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_debug/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_utils/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_nativemodule_core/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_newarchdefaults/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_cxxreactpackage/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_render_componentregistry/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_render_core/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_render_debug/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_render_graphics/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_render_imagemanager/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_render_mapbuffer/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_render_textlayoutmanager/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/rrc_image/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/rrc_view/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/rrc_text/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/rrc_textinput/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/rrc_legacyviewmanagerinterop/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/runtimeexecutor/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/turbomodulejsijni/include -isystem /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/yoga/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -Wall -Werror -Wno-error=cpp -fexceptions -frtti -std=c++20 -DLOG_TAG="ReactNative" -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -MD -MT CMakeFiles/appmodules.dir/OnLoad.cpp.o -MF CMakeFiles/appmodules.dir/OnLoad.cpp.o.d -o CMakeFiles/appmodules.dir/OnLoad.cpp.o -c /Users/Workspace/xx/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp

C/C++: /Users/Workspace/xx/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:74:10: error: use of undeclared identifier 'rncli_cxxModuleProvider'; did you mean 'rncli_ModuleProvider'?
C/C++: return rncli_cxxModuleProvider(name, jsInvoker);
C/C++: ^~~~~~~~~~~~~~~~~~~~~~~
C/C++: rncli_ModuleProvider
C/C++: /Users/Workspace/xx/android/app/build/generated/rncli/src/main/jni/rncli.h:19:30: note: 'rncli_ModuleProvider' declared here
C/C++: std::shared_ptr rncli_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params);
C/C++: ^
C/C++: /Users/Workspace/xx/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp:74:40: error: no viable conversion from 'const std::shared_ptr' to 'const JavaTurboModule::InitParams'
C/C++: return rncli_cxxModuleProvider(name, jsInvoker);
C/C++: ^~~~~~~~~
C/C++: /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_nativemodule_core/include/ReactCommon/JavaTurboModule.h:28:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const std::shared_ptr' to 'const InitParams &' for 1st argument
C/C++: struct InitParams {
C/C++: ^
C/C++: /Users/.gradle/caches/transforms-4/441abbc29e7844d504dda1a0ffede014/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_nativemodule_core/include/ReactCommon/JavaTurboModule.h:28:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const std::shared_ptr' to 'InitParams &&' for 1st argument
C/C++: /Users/Workspace/xx/android/app/build/generated/rncli/src/main/jni/rncli.h:19:116: note: passing argument to parameter 'params' here
C/C++: std::shared_ptr rncli_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params);
C/C++: ^
C/C++: 2 errors generated.

I could build & run iOS version, is it possible that I missed something to update when I do upgrade from 0.72 to 0.74.1?

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.