react-native-safe-area-context
react-native-safe-area-context copied to clipboard
newArchEnabled=true | libreact_codegen_safeareacontext.so', missing and no known rule to make it
Hi,
I was trying to build for android but it seems to fail.
package.json
{ "name": "-", "version": "5.0.0", "private": true, "scripts": { "android_uat": "tsc && react-native run-android --variant=uatDebug --appIdSuffix=uat", "android_dev": "tsc && react-native run-android --variant=devDebug --appIdSuffix=dev", "android_prod": "tsc && react-native run-android --variant=prodDebug --appIdSuffix=beta", "ios_dev": "tsc && react-native run-ios --scheme DEV --configuration DEV.Debug", "ios_uat": "tsc && react-native run-ios --scheme UAT --configuration UAT.Debug", "ios_prod": "tsc && react-native run-ios --scheme PROD --configuration Debug", "pod_install": "cd ios && pod install", "clean_android": "cd android && ./gradlew clean", "clean_ios": "cd ios && xcodebuild clean", "start": "react-native start", "test": "jest", "lint": "eslint .", "postinstall": "npx typesync" }, "dependencies": { "@react-native-community/push-notification-ios": "^1.10.1", "@react-native-firebase/analytics": "14.1.0", "@react-native-firebase/app": "14.1.0", "@react-native-firebase/crashlytics": "14.1.0", "@react-native-firebase/dynamic-links": "14.1.0", "@react-native-firebase/in-app-messaging": "14.1.0", "@react-native-firebase/messaging": "14.1.0", "@react-native-firebase/remote-config": "14.1.0", "@react-navigation/bottom-tabs": "^6.2.0", "@react-navigation/material-top-tabs": "^6.1.1", "@react-navigation/native": "6.0.6", "@react-navigation/native-stack": "6.2.5", "@react-navigation/stack": "6.0.11", "axios": "0.24.0", "deprecated-react-native-prop-types": "^2.3.0", "lottie-ios": "3.4.0", "lottie-react-native": "^5.1.4", "moment": "^2.29.1", "patch-package": "^6.4.7", "prop-types": "15.8.1", "react": "18.1.0", "react-native": "0.70.2", "react-native-calendars": "^1.1288.0", "react-native-date-picker": "^4.2.1", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.1.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-linear-gradient": "^2.5.6", "react-native-localization": "2.1.7", "react-native-localize": "2.1.7", "react-native-pager-view": "^5.4.11", "react-native-paper": "4.11.1", "react-native-reanimated": "^2.9.1", "react-native-safe-area-context": "^4.4.1", "react-native-screens": "3.10.1", "react-native-shadow-2": "^6.0.5", "react-native-share": "^7.6.4", "react-native-svg": "^12.3.0", "react-native-swiper": "^1.6.0", }, "devDependencies": { "@babel/core": "7.16.5", "@babel/eslint-parser": "7.16.5", "@babel/preset-env": "^7.18.10", "@babel/preset-flow": "7.16.5", "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "7.16.5", "@react-native-community/eslint-config": "3.0.1", "@types/babel__core": "7.1.18", "@types/babel__preset-env": "^7.9.2", "@types/eslint": "8.4.1", "@types/jest": "^27.4.0", "@types/prop-types": "15.7.4", "@types/react": "^17.0.38", "@types/react-native": "^0.70.4", "@types/react-native-push-notification": "^8.1.0", "@types/react-native-swiper": "^1.5.12", "@types/react-test-renderer": "^17.0.1", "@typescript-eslint/eslint-plugin": "^5.9.1", "@typescript-eslint/parser": "^5.9.1", "@welldone-software/why-did-you-render": "^7.0.1", "babel-jest": "27.4.5", "babel-plugin-module-resolver": "^4.1.0", "eslint": "8.5.0", "eslint-plugin-flowtype": "8.0.3", "eslint-plugin-import": "2.25.3", "eslint-plugin-jsx-a11y": "6.5.1", "eslint-plugin-react": "7.28.0", "eslint-plugin-react-hooks": "4.3.0", "jest": "27.4.5", "metro-config": "0.72.3", "metro-react-native-babel-preset": "0.72.3", "react-native-svg-transformer": "0.14.3", "react-test-renderer": "17.0.2", "typescript": "^4.5.4" }, "jest": { "preset": "react-native" }, "resolutions": { "@types/react": "17.0.38", "@types/react-dom": "17.0.14" } }
Error That I am getting when building the app:-
Task :app:buildCMakeDebug[arm64-v8a] FAILED C/C++: ninja: error: '/Users/.../android/app/build/react-ndk/exported/arm64-v8a/libglog.so', needed by '/Users/.../android/app/build/intermediates/cxx/Debug/96235725/obj/arm64-v8a/libreact_codegen_safeareacontext.so', missing and no known rule to make it
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong: Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
Build command failed. Error while executing process /Users/.../Library/Android/sdk/cmake/3.18.1/bin/ninja with arguments {-C /Users/.../android/app/.cxx/Debug/96235725/arm64-v8a react_codegen_safeareacontext rndiffapp_appmodules} ninja: Entering directory `/Users/.../android/app/.cxx/Debug/96235725/arm64-v8a' [0/2] Re-checking globbed directories... [1/2] Re-running CMake... -- Configuring done -- Generating done -- Build files have been written to: /Users/.../android/app/.cxx/Debug/96235725/arm64-v8a [0/2] Re-checking globbed directories...
ninja: error: '/Users/.../android/app/build/react-ndk/exported/arm64-v8a/libglog.so', needed by '/Users/.../android/app/build/intermediates/cxx/Debug/96235725/obj/arm64-v8a/libreact_codegen_safeareacontext.so', missing and no known rule to make it
- 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
gradle.properties
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.125.0
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=true
Would really appreciate the help.
Thanks.