I'm using the Glide v4 to load my images, and my app is encountering an error:
I/Glide: Root cause (1 of 1) com.bumptech.glide.load.HttpException: Not Found
at com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher.onResponse(OkHttpStreamFetcher.java:73)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
at first load this is what happen, but when I reload again the image is now appearing.
I am loading an image from my RecyclerView
adapter like:
class MyRecyclerViewAdapter(private val glideApp: GlideRequests): RecyclerView.Adapter<MyRecyclerViewAdapter.ViewHolder>() {
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
//... some stuff
// Set a data
glideApp.asBitmap()
.load(img_url)
.into(holder.itemView.ivImageHolder)
// Set a data
}
}
Any help is appreciated, Thanks.