Search code examples
androidip-addresshttpconnectionconnectionexception

no route to host exception in android even when I use the right ip adress?


So I get the no route to host exception in android and I don't know why...

Things i already did:

  1. disabled firewall
  2. granted internet permission in the manifest file
  3. i use the same ip which I get in ipconfig
  4. checked if I use the same network

This is my ip: ipconfig ipv4 adress

using this ip can access my glassfish server: http://192.168.1.2:8080/ but for some reason I can't connect my phone with this ip adress. any ideas?


Solution

  • I had the same issue. The only thing I did was restarting the router. When I restarted the router I got a new IPv4 adress and than I managed to connect myself with the new adress.