我的 win7系統(tǒng),開始步驟就不寫了,都差不多,遇到問題多百度多谷歌。(參考地址)
本人遇到問題 init 沒有 index.android.js 和 index.ios.js ,只有index.js
而且 在react-native start后 傳說中的 http://localhost:8081/index.android.bundle?platform=android
報錯
后面發(fā)現原來是版本更新了,合并了

使用這個就可以了http://localhost:8081/index.bundle?platform=android
終于成功了!?。。?!

react-native run-android
結果:

趕快下個Android Studio壓壓驚
給懶人的地址~
安卓Android studio

點擊Cancel,在后續(xù)的界面再安裝SDK即可,不要用百度的其他方法哦~~

出現以上的是手機沒有開通 usb調試,或者Android studio沒有裝齊。
可以運行在手機上了。。不過一片紅色
顯示什么:[React Native unable to load script from assets index.android.bundle on windows]
解決方法:具體步驟:報錯頁面晃動手機,顯示菜單 =》 點擊Dev Settings =》 點擊Debug server host & port for device =》 設置IP和端口(ex:192.168.0.20:8081)=》 點擊返回 =》 頁面是空白,再次點擊搖一搖,選擇Reload JS程序就顯示出來了。
歷經九九八十一難,終于可以開始了 。。。不說,上圖

安卓手機 : adb devices
會出現以下bug
$ adb devices
List of devices attached
關掉360殺毒軟件就可以了,明智的方法是遠離360。。。。搞了大半天
react-native手機顯示:Unable to load script from assets index.android.bundle on windows
解決方法:
Using npm version 4.3.0 react-native-cli version 2.01 react-native version 0.49.5
In project directory,
mkdir android/app/src/main/assets
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native run-android
The file name has changed from index.android.js to index.js