How to fix Build Failed React Native app? - react-native

I am trying to run react-native app but it shows below error
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/gtcsys1/Library/Developer/Xcode/DerivedData/TestProject-bqzwxygpsrihljeavlpvpwsbtwbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-F230A7F5FF4BC8599FC7C89764478EBD.sh

Related

Expo react native - Execution failed for task ':expo-modules-core:generateJsonModelRelease'

Help needed, I have been trying for weeks to build my expo project using eas build --platform android but it has been failing with this error
[stderr] Execution failed for task ':expo-modules-core:generateJsonModelRelease'. [stderr] > /home/expo/workingdir/build/node_modules/expo-modules-core/android/CMakeLists.txt : C/C++ release|armeabi-v7a : CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
all my builds using expo build:android worked flawlessly until the advent of eas, it would be nice to get help because building apps with expo has been a little bit of pain since Jan 5 2023

Expo Eas ios Build failed: Fastlane build failed with unknown error

Build failed: Fastlane build failed with unknown error. See logs for the “Run fastlane” and “Xcode Logs” phases for more information.
if anyone had this error before please let men know I am stuck in this for 2 days

Expo react native - Execution failed for task ':expo-modules-core:compileReleaseKotlin'

Help is needed, I have been trying for weeks to build my expo project using "eas build --platform android" command but it has been failing with this error
Execution failed for task ':expo-modules-core:compileReleaseKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
[stderr]
Compilation error. See log for more details
Please help.

getting error gradlew.bat installDebug after installing react navigation and gesture handler

I create the new react native app using command react-native init appName.
After the app created successfully install it in my device using command react-native run-android, it installed successfully, and works fine... no issue
but as soon I install react navigation and gesture handler I am getting the error that Command failed: gradlew.bat installDebug after running command react-native run-android
I don't know what's wrong... my old react native projects are working perfectly fine.
I remember yesterday I run the command gradlew clean in one of my old project.. is this effecting on my new project?
I would be really thankful if someone helps
This is complete error
FAILURE: Build failed with an exception.
* Where:
Settings file 'D:\React Native Apps\Practice\newapp\android\settings.gradle' line: 3
* What went wrong:
Could not compile settings file 'D:\React Native Apps\Practice\newapp\android\settings.gradle'.
> startup failed:
settings file 'D:\React Native Apps\Practice\newapp\android\settings.gradle': 3: unexpected char: '\' # line 3, column 133.
s\react-native-gesture-handler\android')
^
1 error
* 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 1s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
Command failed: gradlew.bat installDebug
Error: Command failed: gradlew.bat installDebug
at checkExecSyncError (child_process.js:616:11)
at Object.execFileSync (child_process.js:634:13)
at runOnAllDevices (D:\React Native Apps\Practice\newapp\node_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19)
at buildAndRun (D:\React Native Apps\Practice\newapp\node_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12)
at isPackagerRunning.then.result (D:\React Native Apps\Practice\newapp\node_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
Oh yeah, it´s a bug i think with RN 0.58 link command
open settings.gradle with a text editor from => 'D:\React Native Apps\Practice\newapp\android\settings.gradle'
replace all '\' with '/' , in my case i had to replace '..\node_modules\react-native-gesture-handler\android' with '../node_modules/react-native-gesture-handler/android'
then react-native run-android
Make sure you already have installed python 2 and last version of jdk And make sure you have already set ANDROID_HOME
And you should follow this structure : https://facebook.github.io/react-native/docs/getting-started.html

React-Native Android Gradlew installDebug results in build failure

I am running a React-Native app but when I try to gradlew installDebug in the android directory I get a build failure. Here is the info I get when I use:
gradlew installDebug --info
`BUILD FAILED
Total time: 1.118 secs
Stopped 0 compiler daemon(s).
Received result CommandFailure[value=org.gradle.launcher.exec.ReportedException: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring project ':app'.] from daemon DaemonInfo{pid=4326, address=[4c8a3b8f-5957-4911-b262-0e36824d2139 port:54258, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=dbec8c34-89ba-4872-9077-12b4b3ff38a0,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home,daemonRegistryDir=/Users/d0ntg0m0ng/.gradle/daemon,pid=4326,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}.`
This is the error I get when I run gradlew installDebug without --info
`android [router] :> ./gradlew installDebug
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Cannot evaluate module react-native-couchbase-lite : Configuration with name 'default' not found.`
"react-native": "^0.15.0", is the version of react-native I am using.
this is the repo that the project is fork from
I am trying to setup the app to my genymotion emulator but the build never finishes.
I have already run the commands to react-native start and set up the sync to the couchbase lite server. Not sure if this is relevant info. I am fairly new to native development and I have no idea where to start with trying to debug this.
include ':app'
include ':react-native-couchbase-lite'
project(':react-native-couchbase-lite').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-couchbase-lite/android')
check the file path