Kapil Rajput Kapil Rajput - 1 year ago 196
Android Question

How to clear cache and Reload Image in Picasso?

I am using

to load image in my application but i facing a issue that my image
is same but image is changing from
calling the same URL but
loading the same image saved in its cache. Now i want to clear the cache for that Image and reload the image again.

What i have tried i searched on SO find that we can use
but i am getting the error message in code

Can't reslove method invalidate

Can't reslove method memoryPolicy

dependency for picasso in gradle :

compile 'com.squareup.picasso:picasso:2.4.0'

Answer Source

invalidate() and memoryPolicy() were introduced in later versions of the library. To use either of them update picasso to the latest version

compile 'com.squareup.picasso:picasso:2.5.2'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download