react-native运行android和react-native启动 [英] react-native run-android and react-native start
问题描述
每次我重新打开项目和模拟器时,是否都必须在命令提示符下运行react-native run-android
和react-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屋!