react-native could not connect t
2018-09-04 本文已影响0人
Allenwang
![](https://img.haomeiwen.com/i9196938/0df941e143eb4caf.png)
使用真机调试RN程序出现以上错误
解决:
请参考:
https://reactnative.cn/docs/running-on-device/
![](https://img.haomeiwen.com/i9196938/8ca013418b7f7d64.jpeg)
以下方法每次都需要执行命令2才能更新
1、创建assets目录
mkdir android/app/src/main/assets
2、执行命令
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/
3、重新运行 react-native run-android