【问题标题】:Access localhost with physical Android device使用物理 Android 设备访问 localhost
【发布时间】:2019-03-31 05:30:27
【问题描述】:

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

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

我收到此错误消息:

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

【问题讨论】:

    标签: dart flutter


    【解决方案1】:

    在终端中运行这个命令:

    ifconfig | grep mask
    

    在第二行显示掩码IP 你可以使用。

    【讨论】:

      猜你喜欢
      • 2022-01-27
      • 2015-11-22
      • 2015-06-27
      • 2019-09-04
      • 2022-12-07
      • 1970-01-01
      • 2015-07-13
      • 2013-02-24
      • 1970-01-01
      相关资源
      最近更新 更多