07-24 09:43:44.198: E/Upload file to server Exception(8298): Exception :
failed to connect to /127.0.0.1 (port 80): connect failed: ECONNREFUSED (Connection refused)
07-24 09:43:44.198: E/Upload file to server Exception(8298): java.net.ConnectException:
failed to connect to /127.0.0.1 (port 80): connect failed: ECONNREFUSED (Connection refused)
我试过Android应用程序将图像文件上传到localhost(UBUNTU)。当我尝试这个时我得到了上面的错误
答案 0 :(得分:3)
使用IP地址 10.0.2.2
代替 127.0.0.1