ReactNative執行報錯Command `run-android` unrecognized. Make sure that you have run `npm install` and tha...

weixin_33912445發表於2018-04-21

新建的React Native專案,執行react-native run-android時報錯

Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.

在專案目錄下執行(不能是sudo su(執行sudo命令給su命令提權,執行su命令)下)

yarn add react-native-cli

再執行react-native run-android即可

相關文章