android okhttp refuse

Failed to connect to localhost/127.0.0.1:8080
Localhost环回地址127.0.0.1是指设备本身。你的Android模拟器上没有运行服务器。

使用10.0.2.2连接到运行模拟器的主机。

更多信息:https://developer.android.com/studio/run/emulator-networking
源地址添加链接描述

你可能感兴趣的:(android,okhttp)