npx react-native run-android 报错 Error: spawnSync gradlew.bat EINVAL
找到项目的文件:
node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js
(0, _child_process().execFileSync)(cmd, gradleArgs, {
stdio: ['inherit', 'inherit', 'pipe'] , shell: true
});
修改上面的内容,加入, shell: true