Sourav Singh
Sourav Singh

Reputation: 1

Error in React Native Android Build After Installing Libraries (e.g., React Navigation,community/blur,etc).react native- v0.76.3

I am encountering an error when building my React Native project on Android after installing external libraries like react-navigation, @react-native-community/blur, or react-native-safe-area-context.

When I create a new React Native project using version 0.76.3, the initial build works perfectly fine. However, as soon as I add any library and try to rebuild the project, the build fails with the following error:

Task :react-native-safe-area-context:generateCodegenSchemaFromJavaScript FAILED Task :react-native-screens:generateCodegenSchemaFromJavaScript FAILED



/Users/sourabh/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android24 --sysroot=/Users/sourabh/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Dreact_codegen_safeareacontext_EXPORTS -I/Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/android/src/main/jni/. -I/Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp -I/Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni -I/Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext -isystem /Users/sourabh/.gradle/caches/8.10.2/transforms/8b60b4f75564ac53567672df7a1c9a73/transformed/fbjni-0.6.0/prefab/modules/fbjni/include -isystem /Users/sourabh/.gradle/caches/8.10.2/transforms/e7a87e28456e3cd3dea6e54dbe4d1714/transformed/react-android-0.76.3-debug/prefab/modules/jsi/include -isystem /Users/sourabh/.gradle/caches/8.10.2/transforms/e7a87e28456e3cd3dea6e54dbe4d1714/transformed/react-android-0.76.3-debug/prefab/modules/reactnative/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 -fexceptions -frtti -std=c++20 -Wall -Wpedantic -Wno-gnu-zero-variadic-macro-arguments -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 safeareacontext_autolinked_build/CMakeFiles/react_codegen_safeareacontext.dir/Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.cpp.o -MF safeareacontext_autolinked_build/CMakeFiles/react_codegen_safeareacontext.dir/Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.cpp.o.d -o safeareacontext_autolinked_build/CMakeFiles/react_codegen_safeareacontext.dir/Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.cpp.o -c /Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.cpp




In file included from /Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.cpp:1: /Users/sourabh/Desktop/Workspace/AwesomeProject/node_modules/react-native-safe-area-context/common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.h:3:10: fatal error: 'react/renderer/components/safeareacontext/Props.h' file not found #include <react/renderer/components/safeareacontext/Props.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cause: error=2, No such file or directory

Upvotes: 0

Views: 235

Answers (0)

Related Questions