Android模拟(simulator)把它自己作为了localhost,也就是说,代码中使用 localhost或者127.0.0.1来访问,都是访问模拟器自己!

如果你想在模拟器simulator上面访问你的电脑,那么就使用android内置的IP 10.0.2.2。即“http://10.0.2.2:xxxx/Default.aspx”。

相关文章:

  • 2022-02-24
  • 2022-12-23
  • 2021-12-06
  • 2021-12-15
  • 2021-07-02
  • 2022-02-10
  • 2021-12-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2021-12-02
  • 2021-10-10
  • 2021-10-21
  • 2021-12-13
相关资源
相似解决方案