skip to Main Content

I’m just trying to run a simple and empty react native project in android emulator but I’m getting this error anyone have any ideas?

error:

Error: C:UsersOnurDesktopReactNativeMemorizingAppandroidgradlew.bat exited with non-zero code: 1
Error: C:UsersOnurDesktopReactNativeMemorizingAppandroidgradlew.bat exited with non-zero code: 1
at ChildProcess.completionListener (C:UsersOnurDesktopReactNativeMemorizingAppnode_modules@expospawn-asyncbuildspawnAsync.js:52:23)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (C:UsersOnurDesktopReactNativeMemorizingAppnode_modulescross-spawnlibenoent.js:34:29)
at maybeClose (node:internal/child_process:1093:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

at Object.spawnAsync [as default] (C:UsersOnurDesktopReactNativeMemorizingAppnode_modules@expospawn-asyncbuildspawnAsync.js:17:21)
at spawnGradleAsync (C:UsersOnurDesktopReactNativeMemorizingAppnode_modules@expoclibuildsrcstartplatformsandroidgradle.js:72:46)
at Object.assembleAsync (C:UsersOnurDesktopReactNativeMemorizingAppnode_modules@expoclibuildsrcstartplatformsandroidgradle.js:52:18)
at runAndroidAsync (C:UsersOnurDesktopReactNativeMemorizingAppnode_modules@expoclibuildsrcrunandroidrunAndroidAsync.js:31:24)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

2

Answers


    • Create an ANDROID_SDK_ROOT variable in your system variables.
    • Add a path to your android SDK.

    Solved the issue for me

    Login or Signup to reply.
  1. In my case, I did not have Gradle installed on my machine.

    1. check if you have Gradle installed gradle -v
    2. if not, install it with Chocolatey choco install gradle (there are other ways to install it)
    3. If yes, run gradle --stop to ensure that no gradle daemon is running
    4. Remove build folder
    5. refresh terminal by running refreshenv in it
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search