英文:
Expo dev client cannot connect to the dev server
问题
开发构建使用expo-dev-client
和Expo应用程序服务似乎在连接到开发服务器时遇到了问题。
在运行npx expo start --dev-client
之后,开发客户端应用程序停留在启动画面上。JavaScript捆绑过程也没有启动。
过一段时间后,我在应用程序上看到了错误屏幕,显示它的请求连接到开发客户端超时。
可能的原因是什么?
英文:
A development build that uses expo-dev-client
and Expo Application Service seems to be having trouble connecting to the dev server.
The dev client app hangs on the splash screen after running npx expo start --dev-client
. The JavaScript bundle process also doesn't start.
After a while, I get the error screen on the app saying that its request to connect to the dev client timed out.
There was a problem loading the project.
This development build encountered the following error:
Failed to load app from http://172.20.1.160:8081
with error: The request timed out.
What might be the reason?
答案1
得分: 2
"Adding --tunnel
to the expo start
command solved the issue.
npx expo start --dev-client --tunnel
更多关于“隧道连接”的信息,请参阅此 expo-cli 文档页面。"
英文:
Adding --tunnel
to the expo start
comment solved the issue.
npx expo start --dev-client --tunnel
More information on "tunneling" at this expo-cli doc page.
答案2
得分: 0
expo sdk 49
eas build --profile development-simulator --platform ios
iOS模拟器构建,安装到模拟器上,然后运行
npx expo start --dev-client
英文:
expo sdk 49
eas build --profile development-simulator --platform ios
iOS simulator build install on simulator then run
npx expo start --dev-client
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论