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目录


 

猜你喜欢

转载自www.cnblogs.com/windseek/p/11111099.html
今日推荐