1.在运行程序中 在cmd中执行react-native run-android遇到的问题


解决办法:在夜神模拟器中配置ip
在cmd中输入ipconfig查找ip

在夜神模拟器的Dev Settings中配置当前ip

解决问题:

2.

解决办法:将夜神模拟器重启
在cmd 中输入adb connect 127.0.0.1:62001 设置夜神模拟器的主机和端口号,接着输入cd hello3 回车,再输入react-native run-android
3.

解决办法:将hello3删除,再重启夜神模拟器,在cmd中执行命令:react-native init hello3 --version 0.55.4,执行命令:adb connect 127.0.0.1:62001,执行命令:cd hello3,执行命令:react-native run-android。
4.

在index.js中修改项目名

5

项目hello4中缺图
将图片插入到hello的文件夹中再重新运行

网友评论