我正在尝试使用react-native run-android将我的react-native应用程序安装在android studio模拟器上。我已经使用abd-devices检查了模拟器是否可用,并且已经运行了npm-install。
我正在将Ubuntu 18.04与最新版本的android studio和最新的Pixel 2 XL API 28一起使用。
我收到以下错误:
spawnSync ./gradlew EACCES
Error: spawnSync ./gradlew EACCES
at Object.spawnSync (internal/child_process.js:998:20)
at spawnSync (child_process.js:622:24)
at Object.execFileSync (child_process.js:650:13)
at runOnAllDevices (/home/user/react/front-end/project/node_modules /react-native/local-cli/runAndroid/runAndroid.js:299:19)
at buildAndRun (/home/user/react/front-end/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:135:12)
at isPackagerRunning.then.result (/home/user/react/front-end/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:65:12)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
我尝试过几次重新启动PC和仿真器。有任何想法吗?
更新:我重新安装了JDK,npm,react-native-cli和android studio。它仍然给我完全相同的错误。请帮忙。