1、安裝nodejs nodejs版本號要>=6绢陌,npm版本號要<5
2鞍陨、
npm install react-native-cli 安裝rn命令行工具
image.png
react-native --help 查找rn命令
image.png
init 初始化一個rn項目
-h 查找?guī)椭?br> -v 查看當前命令行工具版本
3蒿囤、下載安卓模擬器 andriod studio jdk 8
https://developers.google.cn/
https://developer.android.google.cn/
https://www.bgrc.fun/posts/rn1/index.html
4贾富、創(chuàng)建項目(出現(xiàn)錯誤可能是npm版本問題)
react-native init app
image.png
安裝成功
5歉眷、在安卓模擬器中打開項目 安裝sdk 以及一些其他依賴,直到?jīng)]有紅色感嘆號
image.png