1

Androidでアプリを構築していますが、これに問題があります

InetAddress.getByName(ipAddres).getHostName() return ip Addres

ジャワ

InetAddress.getByName(IpAddres).getHostName() return hostname

Androidでは、同じコードがホスト名ではなくIPアドレスを提供するのはなぜですか。ホスト名が必要です

4

1 に答える 1

0

check your DNS server, had a similar issue. I installed and configured dnsmasq and was able to get the hostnames from ip addresses

于 2014-09-28T16:44:33.793 に答える