Android 试图运行react本机项目时出现Watchman和其他错误。为什么会发生这种情况?

Android 试图运行react本机项目时出现Watchman和其他错误。为什么会发生这种情况?,android,react-native,homebrew,watchman,Android,React Native,Homebrew,Watchman,为了遵守react本机环境对我的建议,我使用brew安装了watchman。尝试在android emulator上运行应用程序后,应用程序无法启动,并出现以下错误: 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#andr

为了遵守react本机环境对我的建议,我使用brew安装了watchman。尝试在android emulator上运行应用程序后,应用程序无法启动,并出现以下错误:

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:1041:20)
    at spawnSync (child_process.js:616:24)
    at execFileSync (child_process.js:643:15)
    at runOnAllDevices (/Users/shehab/myapp/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 (/Users/shehab/myapp/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:182:9)

同时在metro bundler选项卡上:

Loading dependency graph...2020-03-12T17:45:30,693: [0x7fff9aad5380] while computing sockname: failed to create /usr/local/var/run/watchman/shehab-state: No such file or directory

Watchman:  watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2020-03-12T17:45:30,693: [0x7fff9aad5380] while computing sockname: failed to create /usr/local/var/run/watchman/shehab-state: No such file or directory

谢谢你的阅读。如果您以前遇到过此错误并已解决,请与他人分享。如果您认为此错误是特殊的,并且您可以解决它,请执行。

您可以使用
watchman watch del all
清除watchman缓存吗?您可以通过阅读错误消息来达到更高的目标。。哈哈,说得好。英雄联盟