Connection to localhost: 3000 refused on Android device

I am trying to connect to a calm web service created over rails from my Android app.

When I try to connect to the REST API deployed to http://localhost:3000, I get this error:

Disconnected connection to http: // localhost: 3000 .

I am running ubuntu natty narwhal.

Clicking this URL through the browser gets the response correctly.

How can this be solved?

+5
source share
1 answer

If you are testing your application on your device, then localhost is the device. If you are testing in an emulator, look at this document.

, , , , , 10.0.2.2, loopback -. localhost (127.0.0.1) loopback.

/ 3000 .

+7

All Articles