You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native应用无法在HTC M8s的Expo中启动的问题求助

问题:同一WiFi下Expo无法在HTC M8s上加载我的React Native应用

大家好,我遇到了一个Expo连接的问题,希望能得到帮助:

我用Windows 10开发React Native应用,想在已经安装Expo的HTC M8s手机上测试。控制台运行npm start后,不管是扫描二维码还是手动输入控制台给出的地址exp://10.168.4.171:19000,手机端的Expo都提示无法加载这个地址。

基础信息

  • PC和手机确实连接的是同一个WiFi网络
  • 我执行了ipconfig命令,结果如下:
Ethernet adapter Ethernet: 
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : myhostname.net
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : myhostname.guest
Link-local IPv6 Address . . . . . : fe80::8136:d112:d190:5fd8%17
IPv4 Address. . . . . . . . . . . : 10.168.4.171
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.168.4.1
Ethernet adapter Ethernet 6:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : 
Wireless LAN adapter Local Area Connection* 1:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : 
Ethernet adapter Ethernet 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : 
Ethernet adapter Bluetooth Network Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : 
Tunnel adapter Local Area Connection* 11:
Connection-specific DNS Suffix . : 
Link-local IPv6 Address . . . . . : fe80::1c40:2198:f557:fb54%11
Default Gateway . . . . . . . . . : 
  • npm start的输出明确显示可以在Expo搜索栏输入exp://10.168.4.171:19000
  • PC本地安装的Expo应用能正常运行(不过它显示的二维码和控制台的不一样),但我希望在手机端的Expo里运行应用
  • 另外我在另一台Windows 10电脑上测试过,用create-react-native-app创建项目并运行后,手机能通过WiFi正常连接上

已经尝试过的解决办法

  • 卸载了PC上的VirtualBox(之前看到有人说虚拟机可能干扰网络)
  • 在Windows网络设置里把WiFi适配器的优先级调到了最高

现在还是解决不了,有没有大佬知道哪里出问题了?


内容的提问来源于stack exchange,提问作者TheOpti

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:40:44