美文网首页React Native学习
react-native could not connect t

react-native could not connect t

作者: Allenwang | 来源:发表于2018-09-04 17:00 被阅读0次
device-2018-09-04-170154.png

使用真机调试RN程序出现以上错误

解决:
请参考:
https://reactnative.cn/docs/running-on-device/

22.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

相关文章

网友评论

    本文标题:react-native could not connect t

    本文链接:https://www.haomeiwen.com/subject/eqcnwftx.html