ReactNative运行报错Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
新建的React Native项目,运行react-native run-android时报错
Command
run-android
unrecognized. Make sure that you have runnpm install
and that you are inside a react-native project.
在项目目录下运行(不能是sudo su(运行sudo命令给su命令提权,运行su命令)下)
yarn add react-native-cli
再运行react-native run-android即可