使用--live-reload
参数时,我无法在手机上看到我的离子应用程序。Ionic --live-reload未在设备上运行应用程序
我使用Windows 8.1和连接的Nexus 5 Android设备。该应用程序是sidemenu使用ionic start demo sidemenu
创建的应用程序。
当我运行ionic run --live-reload
,我第一次得到由可能的IP地址的列表中显示:
Multiple addresses available.
Please select which address to use by entering its number from the list below:
Note that the emulator/device must be able to access the given IP address
1) 192.168.0.109 (Wi-Fi)
2) 192.168.159.1 (VMware Network Adapter VMnet1)
3) 192.168.174.1 (VMware Network Adapter VMnet8)
4) 192.168.56.1 (VirtualBox Host-Only Network)
我选择选项1 - 这是我的开发PC的IP地址,即托管离子服务器。
离子证实了这一选择,并确认它是服务于下面的端口:
Selected address: 192.168.0.109
Running live reload server: http://192.168.0.109:35729
Watching : [ 'www/**/*', '!www/lib/**/*' ]
Running dev server: http://192.168.0.109:8100
我证实,它是由我的电脑上打开浏览器并导航到http://192.168.0.109:8100
服务页面当应用程序在Android设备上运行时,它首先显示启动画面,然后显示错误的webview:
Web page not available
The Web page at http://192.168.0.109:8100/ could not be loaded as:
net::ERR_ADDRESS_UNREACHABLE
这也被报道了离子论坛:
至于我可以告诉大家,我已经打开了TCP端口35729 & 8100在我的Windows机器上(使用控制面板 - 防火墙设置)。
我必须配置什么才能在我的设备上看到我的Ionic应用程序?
对于这种一般性问题有用的信息。很高兴知道有人从本地应用程序进入混合应用程序。 –