When I developed an application that connect to my own web service ( I made my own simple web service too ^-^), I got this error "java.net.ConnectException localhost/127.0.0.1:8080 - Connection Refused".
Hei, why my application got this error? I check my web service, it up and running well, I check the AndroidManifest, I already added the permissions to access Internet, what else?
This is happen because I read no documentation before about connecting to Localhost in Android, it has stated in Android Doc, that connection to localhost is a loopback address of the Emulator or handset. I need to use 10.0.2.2 address. What a dumb, you can read the explanation here.
Friday, September 16, 2011
Subscribe to:
Post Comments (Atom)
1 komentar:
haha..
i'm IT man too..
cheerss... -_^
Post a Comment