Android still uses old ip when resolving hostname I have a weird problem here.

I use ftp to exchange files between my smartphone (Xperia Z5 compact) and my pc. A while back the pc had a static ip address but now it's assigned one via dhcp. When I try to connect to the pc from the phone by way of the pc's hostname it still uses the old static ip the pc once had.

Any ideas as to what I can do about this?
You can  clear arp cache using this command in terminal:

ip -s -s neigh flush all 


(or simply ip neigh flush 192.168.xx.0/yy if you know the network range)

While not necessary, you may need to reboot the device, ping the hostname again and see if its resolved to new IP.

Looking from the other side, you can try resetting winsock entries and TCP/IP stack for the PC and see if it solves the issue.