這件事超過了今年工作了,突然開始返回異常reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));開始迴歸例外
這裏的一些AsynkTask的:
URLConnection conn = url.openConnection();
try
{
reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
//the rest of the code doesn't go - exception works out
}
catch(Exception ex)
{
Error = ex.getMessage();
}
現在,URL是有效的 - 我從調試和粘貼複製在瀏覽器 - 它返回我一個非常好的JSON,因爲它應該。 而這整個事情工作了一年,現在它捕捉到一個例外 - FileNotFound
它可能是什麼,我該如何解決它?
web服務器返回404 - 但在瀏覽器中,此url顯示罰款 – 2014-10-26 17:31:55
查看getErrorStream返回的內容。 – alterfox 2014-10-26 17:32:52