我的Android设备和我的流星服务器需要在同一个网络上进行通信(参见警告信息)。我的meteor服务器正在Ubuntu上运行,VM内有VMWare Workstation 12 Player,我的android连接到我的本地WiFi。我该怎么办?
$ meteor run android-device --port 3001
=> Started proxy.
WARNING: You are testing your app on a remote device. For the mobile
app to be able to connect to the local server, make sure your device
is on the same network, and that the network configuration allows
clients to talk to each other (no client isolation).
=> Started your app.
=> App running at: http://localhost:3001/
=> Started app on Android Device.
答案 0 :(得分:0)
在VMWare菜单中,转到Player > Manage > Virtual Machine Settings > Network Adapter
并选择Bridged
。也许你需要重启你的VM,我没有。
如果您的物理机运行Windows,您可以检查两台主机是否在Ubuntu上与ifconfig -a
位于同一网络中,ipconfig
。如果它不起作用,请尝试从您的物理机器ping其他连接到本地网络的设备(有时提供商设备过滤内部流量)。