私はURLからの入力ストリームを取得しようとすると、私は次のエラーを取得:HTTPレスポンスコード500/FileNotFoundExceptionを
W/System.err: java.io.FileNotFoundException: https://...
W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
W/System.err: at com.andrei.mobilissimoro.MainActivity$FeedTask.doInBackground(MainActivity.java:406)
W/System.err: at com.andrei.mobilissimoro.MainActivity$FeedTask.doInBackground(MainActivity.java:371)
W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:305)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
W/System.err: at java.lang.Thread.run(Thread.java:761)
、レスポンスコードはここに500 あるコードです:
HttpURLConnection httpURLConnection;
try {
httpURLConnection = (HttpURLConnection)new URL(feed).openConnection();
httpURLConnection.setRequestMethod("GET");
Integer status = httpURLConnection.getResponseCode();
System.out.println(status.toString());
InputStream inputStream = httpURLConnection.getInputStream();
feedModelList = parseFeed(inputStream);
}
catch (Exception e){
e.printStackTrace();
}
サーバーの問題 –