Android 7+上的Universal Image Loader的FileNotFoundException

时间:2018-04-19 11:20:43

标签: android filenotfoundexception universal-image-loader android-7.0-nougat android-7.1-nougat

我在我们的Android应用程序中使用Universal Image Loader进行图像加载。它适用于常规链接,但是,由于我们的API已更改,现在此链接无效:https://img.anews.com?url=https://img.anews.com/media/posts/images/20180419/89413447.jpg&w=1080&h=735

这是错误日志:

04-19 11:08:11.717 16501-16779/anews.com E/ImageLoader: https://img.anews.com?url=https://img.anews.com/media/posts/images/20180419/89413447.jpg&w=1080&h=735
java.io.FileNotFoundException: https://img.anews.com?url=https://img.anews.com/media/posts/images/20180419/89413447.jpg&w=1080&h=735
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
    at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromNetwork(BaseImageDownloader.java:124)
    at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:88)
    at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.getImageStream(BaseImageDecoder.java:98)
    at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.decode(BaseImageDecoder.java:74)
    at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage(LoadAndDisplayImageTask.java:265)
    at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:238)
    at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:761)

我似乎只在Android 7+上遇到此问题。在以前的所有版本中,图像加载得很好。任何帮助或建议表示赞赏。

0 个答案:

没有答案