使用物理Android设备访问本地主机

时间:2019-03-31 05:30:27

标签: dart flutter

我正在尝试使用物理Android设备访问在http://localhost:8000/test上运行的nginx Web服务。

但是它不起作用。使用http://localhost:8000/testhttp://10.0.2.2:8000/test

我收到此错误消息:

  

未处理的异常:SocketException:操作系统错误:网络为   无法访问,errno = 101,地址= 10.0.2.2,端口= 40914

1 个答案:

答案 0 :(得分:0)

在终端中运行此命令:

WARNING: The specified Android SDK Build Tools version (25.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.2.
Android SDK Build Tools 28.0.3 will be used.

您可以在第二行显示掩码[server:default] method = TLSv1.2 verify_certificate = no require_certificate = no private_key = /etc/kamailio/kamailio-selfsigned.pem certificate = /etc/kamailio/kamailio-selfsigned.pem #ca_list = /etc/kamailio/tls/cacert.pem #crl = /etc/kamailio/tls/crl.pem . . . [client:default] #method = TLSv1 verify_certificate = no require_certificate = no 中使用。 enter image description here