[英]React-native project error “could not connect to development server”
When I run "react-native run-android", it gives me the error: 当我运行“ react-native run-android”时,它给了我错误:
could not connect to development server...
无法连接到开发服务器...
So I had to start my project as follows: 因此,我必须按以下步骤开始我的项目:
./gradlew clean
./gradlew clean
的android文件夹 react-native run-android
. react-native run-android
。 I have to repeat this cycle every time I run my project. 每次运行项目时,我都必须重复此循环。
Is there any permanent solution to get rid of this? 是否有永久性的解决方案可以摆脱这种情况?
Quicker solution: run npm start
when you get error could not connect to development server...
happens. 更快的解决方案:出现错误时
could not connect to development server...
运行could not connect to development server...
,请运行npm start
。
A permanent solution may require you to reinstall or update most of your dev tools. 永久性解决方案可能需要您重新安装或更新大多数开发工具。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.