简体   繁体   中英

Http Connection Refused on Android

I am having a problem to connect to the server via android application which is running on a phone.

Why my browser on my phone can connect to the server, but my program can not connected to the server? org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.XX.XX:82 refused, network host unreachable etc etc

For the possible case may occur check it.

Is that IP address accessible to outside world?

Just a guess: I think the IP address, you were using might have been reserved. It worked in emulator cause you were still in the network (probably in your office). As you came outside the network with your real device it didn't work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM