Command `run-android(ios)` unrecognized.


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 





 






  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值