React原生android命令不适用于现有项目,仅适用于Ubuntu 19.10中的新项目

React原生android命令不适用于现有项目,仅适用于Ubuntu 19.10中的新项目,android,react-native,Android,React Native,正如问题标题所说,react native run android命令只适用于新的react native poject,它在android仿真器上工作。上周创建的现有项目未运行react native run android命令。错误是- info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 971 file(s)

正如问题标题所说,react native run android命令只适用于新的react native poject,它在android仿真器上工作。上周创建的现有项目未运行react native run android命令。错误是-

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)
卸载@react本机社区模块,然后重试


希望它能起作用,不要怀疑。

我解决了这个问题。需要更改项目目录中android文件夹中的权限

chmod 755 android/gradlew 

答案来源-

感谢您的回复,但没有帮助。