react-native 环境安装常见问题

npm install react-native-cli -g

react-native init yourproject

npm install 

react-native run-ios

问题1:卡在命令行里打开不了模拟器;解决方法:打开vpn,有些依赖需要FQ

react-native run-android

问题2:

Failed to install the following Android SDK packages as some licences have not been accepted

解决方法:Change directory to /Users/windseek/Library/andriod/sdk/tools/bin And over here run ./sdkmanager --licenses Accept the licenses and you'll be good to go

问题3:Make sure you have an Android emulator running or a device connected and have
运行一个安卓模拟器
在android目录下新建local.properties

sdk.dir = /Users/windseek/Library/Android/sdk
设置sdk目录


 

posted on 2019-06-30 20:36  杨龙飞  阅读(396)  评论(0编辑  收藏  举报

导航

Fork me on GitHub