Comments (11)
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.
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.
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.
same problem on android build with new architecture
from cli.
cc @cortinico
from cli.
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.
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.
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.
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.
@miinos can you share a repro then, where we can reproduce this issue?
from cli.
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 ¶ms);
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 ¶ms);
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)
- error index.js: Cannot read properties of undefined (reading 'match'). HOT 1
- How do you set mode with 'react-native start'? HOT 3
- Error on fresh projects in Lauching app in the emulator, RN -v 0.73 - Starting: intent HOT 3
- sdk version problem HOT 1
- Something is trying to use the devDependency 'metro-config' when building a production release build HOT 4
- Fail to download yarn if there is expired GITHUB_TOKEN HOT 4
- Android SDK: Not Found HOT 1
- Project initialization hangs HOT 5
- Failure of pod install for the React Native project using Yarn Berry - Yarn 3.x or 4.x. HOT 3
- Getting Error While initialization react native app in ubuntu HOT 12
- Able to build ios app but unable to get build settings to deplou HOT 2
- Handle prompts in `init` command HOT 1
- React Native Build Failed After update build.gradle compileSdkVersion=34
- Read main activity from manifest not correctly handling activities with "missing" intent nodes
- How to fix CompileC normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'Pods-urbex' from project 'Pods') failure in react-native ios HOT 1
- Experimental debugger support for custom hostnames HOT 1
- AndroidManifest.xml intent-filter error
- please Help me I can't fix this error HOT 2
- Build Failed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.