Picasso does not load the image nor does it log
See original GitHub issueI am supplying picasso through Koin (DI).
This is my Picasso configuration
fun getPicasso(context: Context, downloader: OkHttp3Downloader): Picasso {
return Picasso.Builder(context)
.downloader(downloader)
.indicatorsEnabled(true)
.loggingEnabled(true)
.build()
}
This is theOkHttp3 and OkHttp3Downloader
fun getPicassoDownloader(okHttpClient: OkHttpClient): OkHttp3Downloader {
return OkHttp3Downloader(okHttpClient)
}
fun getOkHttpInstance(headerInterceptor: HeaderInterceptor, loggingInterceptor: HttpLoggingInterceptor, cache: Cache): OkHttpClient {
return OkHttpClient.Builder()
.addInterceptor(headerInterceptor)
.addInterceptor(loggingInterceptor)
.cache(cache)
.build()
}
This OkHttp3 is a singleton used across every entity that requires it such as Retrofit, Picasso.
I then load the image like this in a recycler view
picasso.load(image.urls?.regular)
.fit()
.centerCrop()
.into(itemView.item_image)
I have logged the URL’s and verified that the URL’s are working But I see no image in the imageView nor do I see any logs as I’ve set logging interceptor to be true.
I also tried commenting out the OkHttpDownloader instance in picasso so that I use the default configuration. But that doesn’t work either.
Picasso Version : 2.71828 OkHttp3Downloader Version: 1.1.0 OkHttp3 Version : 3.10.0
Android Device : One Plus 6 Android Version : 8.1.0 Android OS : Oxygen OS 5.1.8
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:21 (3 by maintainers)
Top Results From Across the Web
Android Picasso Image does not load - Stack Overflow
NOTE: In my case I was capturing image from device's camera then uploading it to firestore and then loading image using picasso. So...
Read more >How to Use Picasso Image Loader Library in Android?
If an image or set of images aren't loading, make sure to check the Android monitor log in Android Studio. There's a good...
Read more >Displaying Images with the Picasso Library
Displaying images is easiest using a third party library such as Picasso from Square which will download and cache remote images and abstract...
Read more >Using Picasso in Android | Engineering Education (EngEd ...
Picasso is a powerful image loading, downloading, and caching library ... Picasso does not support GIF animation on a simple image view.
Read more >Picasso Tutorial for Android: Getting Started
Passing a null reference as a parameter will not trigger any request but will display a placeholder image if you have specified one....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here is working project with the issue. https://github.com/Kolyall/Picasso271828 To fix it use
com.squareup.picasso.OkHttp3Downloader
instead ofcom.jakewharton.picasso.OkHttp3Downloader
Be oversure image URL path with https protocol, hopefully, it will be work!!!
Example:
https😕/bangladhol.com/book_th/C29B5E81.jpg
instead of
http😕/bangladhol.com/book_th/C29B5E81.jpg