react-native run-android 和 react-native start [英] react-native run-android and react-native start

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

问题描述

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

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?

--谢谢

推荐答案

您通常会这样做.react-native run-android 命令可能是可选的,如果您不想再次部署 android 本机代码(例如,如果您没有进行任何更改).您必须手动启动应用程序,它会尝试连接到以 react-native start 开头的打包程序.我不确定您是否可以捆绑 JS 以在调试模式下离线使用.也许您可以尝试与 this answer 中相同的程序,但使用 assembleDebug 以避免那个.

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 run-android 和 react-native start的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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