我已經構建了一個簡單的Web服務,它只是簡單地使用HttpListener來接收和發送請求。有時,服務會因「指定的網絡名稱不再可用」而失敗。當我寫入HttpListenerResponse的輸出緩衝區時,它似乎被拋出。 以下是錯誤: ListenerCallback() Error: The specified network name is no longer available at Syst
任何人都可以告訴我爲什麼這不起作用的Android模擬器?從瀏覽器中我可以訪問,服務器是內部的。我能想到的是,我錯過了我的應用程序的一些配置,所以它可以訪問網絡層。 try {
InetAddress server = Inet4Address.getByName("thehost");
//Doesn't work either
//or InetAddress s