react-native ,首先,我想要引入轮播图效果,然后找了一个
react-native-swiper
执行了以下语句
npm uninstall react-native-swiper –save / yarn add react-native-swiper
居然报错了-
Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
照着提示执行了
npm install / yarn
react-native run-android 还是报错,依旧很让人惆怅~!!!~~~~
结果网上看了一大堆乱七八糟的解决方法,没有效果
.......
找着看到了这个一个国外网站写着这么几句话
4、Command `run-ios` unrecognized. Did you mean to run this inside a react-native project?
npm install -g react-native-cli
npm install --save react-native@latest
照着敲进去了
npm install -g react-native-cli / npm install -g yarn react-native-cli
npm install --save react-native@latest / yarn add react-native@latest
react-native init
之后呢,居然可以了,上天保佑无bug~!!!!!!
好了问题解决了,记录一下
报错:
Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
解决方法:
npm install -g react-native-cli / npm install -g yarn react-native-cli
npm install --save react-native@latest / yarn add react-native@latest
react-native init