Android ECONNREFUSED (Connection refused)

后端 未结 2 573
后悔当初
后悔当初 2020-12-11 22:26

I have tried to send data to server with this code from my android application.

try {
    HttpClient httpClient = new DefaultHttpClient();
    HttpPost httpP         


        
2条回答
  •  攒了一身酷
    2020-12-11 22:45

    Is your phone on the same network as the computer where you connect with the ip number? Is the server on the public internet? I get this error when I forget to put my phone on my local wifi network and it wants to connect to a server on my local network.

提交回复
热议问题