接触RN有一段时间的了,但是现在电脑换掉了,所以从新进行配置一下,这段时间坚持每日已更新吧。争取早日学会RN!!!
本人现有环境windows10+已有Android的相关环境
1.C++环境安装 本人安装了VS2013
2.git的安装
3.node.js的安装(选择windows)
以上软件基本安装成功
在git-cmd.exe 中执行
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
然后在github 上下载facebook的react-native-master文件 进入react-native-cli文件执行
npm install -g react-native-cli
然后创建文件
react-native init 自己项目名
运行包
react-native start
然后在Android上运行
react-native run-android
错误:
1.SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
在环境变量中添加AndroidHome 给他相应的SDK路径即可
2.A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.1
更新SDK 添加23.0.1即可
相关软件和安装包百度云链接:链接:http://pan.baidu.com/s/1pLfCyvD 密码:38jk