0
iOS設備上
我試圖在iOS設備上初始化JmDNS,獲得與行地址iOS設備這會導致一個UnknownHostException,與堆棧跟蹤:的UnknownHostException在RoboVM
java.net.UnknownHostException: Unable to resolve host "#{name of iphone}": nodename nor servname provided, or not known
at libcore.io.GaiException.rethrowAsUnknownHostException(GaiException.java)
at java.net.InetAddress.lookupHostByName(InetAddress.java)
at java.net.InetAddress.getLocalHost(InetAddress.java)
at com.glassknuckle.ThiefTown.Networking.ThiefClient$NETWORK_TASK.run(ThiefClient.java)
at java.lang.Thread.run(Thread.java)
Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NONAME (nodename nor servname provided, or not known)
at libcore.io.Posix.getaddrinfo(Native Method)
at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java)
... 4 more
我讀過的意見並稱「127.0.0.1」傳遞的地址,但這並不當其它設備試圖連接到工作它通過這個IP。 我不知道該從這裏做什麼 - 我絕對需要獲得本地IP地址,但我不知道如何獲得它。這似乎與roboVM有關,但我不完全確定。也許有人可以對此有所瞭解?
嗨!我也有同樣的問題。你能把劇本給我嗎? – Alex