Tuesday, April 10, 2012

Re: [android-developers] java.net.SocketException:No route to host

Can you browse in general?  Does your network work?

If you take a bugreport you can get a snapshot of the state of the device.  You can also check things manually using adb shell and various commands, but the bugreport is convenient.

You should be able to check the routing table and see if you do have a route to the host - you should see a default route (0 destination with a non-0 gateway).

Are you trying to reach a non-public server?  Is it possible you really do have no route?  In the absences of specific routes your traffic will go to your default gateway.  If it doesn't have a route to your destination you'll get this error too.

Lastly, does your app of internet permission?  I think you should get errors trying to create a socket if you don't (earlier than this), but I'm not entirely sure..  definitely something to check.

R

On Sun, Apr 8, 2012 at 3:08 AM, Allen George <deepak1134@gmail.com> wrote:
Hi All,

I have designed and developed an android application for User log in
and log out.

When I try and run this application in an android device I receive an
error in the device "java.net.SocketException:No route to host"

I have tried disabling/enabling the Wi-fi connection in the android
device, but no help.

Is there a work around for this issue.

Kindly help.

Thanks

Allen George.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment