naDan
naDan

Reputation: 83

Unable to start my react native expo bare workflow application on android

I try to start my react native application initialize with expo bare workflow on android but it shows me this error

npx expo run:android › Building app... Configuration on demand is an incubating feature.

Configure project :expo

Using expo modules

The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal. Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects. If the parent project does not need the plugin, add 'apply false' to the plugin line. See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl The Kotlin plugin was loaded in the following projects: ':expo', ':expo-modules-core'

Task :expo-constants:createDebugExpoConfig Execution optimizations have been disabled for task ':expo-constants:createDebugExpoConfig' to ensure correctness due to the following reasons:

Task :expo-modules-core:buildCMakeDebug[armeabi-v7a] C/C++: ninja: error: manifest 'build.ninja' still dirty after 100 tries

Task :expo-modules-core:buildCMakeDebug[armeabi-v7a] FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

com.android.ide.common.process.ProcessException: ninja: Entering directory `D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules\expo-modules-core\android.cxx\Debug\6v603819\armeabi-v7a' [0/1] Re-running CMake... -- Configuring done -- Generating done -- Build files have been written to: D:/naDan/Ordinateur/Cours_programming/Javascript/React_Native/3Autres/UEAVote/ueavote/node_modules/expo-modules-core/android/.cxx/Debug/6v603819/armeabi-v7a

C++ build system [build] failed while executing: @echo off "C:\Users\naDan\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ -C ^ "D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules\expo-modules-core\android\.cxx\Debug\6v603819\armeabi-v7a" ^ expo-modules-core from D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules\expo-modules-core\android ninja: error: manifest 'build.ninja' still dirty after 100 tries

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.

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. ==============================================================================

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness. Please consult deprecation warnings for more details.

BUILD FAILED in 3m 9s 265 actionable tasks: 44 executed, 103 from cache, 118 up-to-date Error: D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\android\gradlew.bat exited with non-zero code: 1
Error: D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\android\gradlew.bat exited with non-zero code: 1
at ChildProcess.completionListener (D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules@expo\spawn-async\build\spawnAsync.js:52:23)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28) at cp.emit (D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules\cross-spawn\lib\enoent.js:34:29) at maybeClose (node:internal/child_process:1091:16) at ChildProcess._handle.onexit (node:internal/child_process:302:5) ... at Object.spawnAsync [as default] (D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules@expo\spawn-async\build\spawnAsync.js:17:21) at spawnGradleAsync (D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules@expo\cli\build\src\start\platforms\android\gradle.js:72:46) at Object.assembleAsync (D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules@expo\cli\build\src\start\platforms\android\gradle.js:52:18) at runAndroidAsync (D:\naDan\Ordinateur\Cours_programming\Javascript\React_Native\3Autres\UEAVote\ueavote\node_modules@expo\cli\build\src\run\android\runAndroidAsync.js:31:24) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Upvotes: 4

Views: 1717

Answers (1)

Marline
Marline

Reputation: 269

The highest rated answer to this question React Native on Android: Cannot run program "node": error=2, No such file or directory solved the issue for me. It also includes explanations as to why.

Upvotes: 0

Related Questions