react-native运行android和react-native启动 [英] react-native run-android and react-native start

查看:146
本文介绍了react-native运行android和react-native启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我重新打开项目和模拟器时,是否都必须在命令提示符下运行react-native run-androidreact-native start?

-谢谢

解决方案

您通常这样做.如果您不想再次部署android本机代码(例如,如果您未进行任何更改),则react-native run-android命令可能是可选的.您将必须手动启动该应用程序,并且它将尝试连接到以react-native start开头的打包程序.我不确定是否可以捆绑JS以便在调试模式下脱机使用.也许您可以尝试使用与此答案中相同的过程,但是可以使用assembleDebug来避免该问题. >

Do I have to run react-native run-android and react-native start in my command prompt every time time I reopen my project and emulator?

-- Thanks

解决方案

You usually do. The react-native run-android command might be optional if you do not want to deploy the android native code again (for instance, if you have not made any changes). You will have to launch the application manually and it will try to connect to the packager that starts with react-native start. I am not sure if you can bundle the JS for offline use in debug mode. Maybe you can try the same procedure as in this answer, but with assembleDebug in order to avoid that one.

这篇关于react-native运行android和react-native启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆