0

As the question title says, the react-native run-android command is only working for new react native poject and it works on the android emulator. The existing project which was created last week is not running the react-native run-android command. The error is -

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 971 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: spawnSync ./gradlew EACCES
    at Object.spawnSync (internal/child_process.js:1045:20)
    at spawnSync (child_process.js:597:24)
    at execFileSync (child_process.js:624:15)
    at runOnAllDevices (/work/Project/BeautyMate/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Command.handleAction (/work/Project/BeautyMate/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:164:9)
Joel
  • 120
  • 1
  • 12

2 Answers2

1

I solved the issue. Need to change the permission in the android folder inside the project dir.

chmod 755 android/gradlew 

Source of answer - Stack Overflow

Joel
  • 120
  • 1
  • 12
0

uninstall @react-native-community module and then try.

Hope it works , feel free for doubts.

Anuj Sharma
  • 429
  • 6
  • 17