Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot find symbol method with() using picasso library android

i'm getting one issue in android app, I am trying to check already existing app, the app contains

 implementation('com.squareup.picasso:picasso:3.0.0-SNAPSHOT') {         exclude group: 'com.android.support'     } 

picasso library and

using that library in a class, here is the code

import com.squareup.picasso.Picasso;      Picasso.with().load(url).placeholder(R.drawable.default_pic).into(imageView); 

here is the error, Error:(49, 20) error: cannot find symbol method with()

and my android studio version is 3.0 RC1, is this is an issue ?

like image 754
Afsara Avatar asked Dec 16 '17 10:12

Afsara


People also ask

What is Picasso library in Android?

Picasso is an image library for Android. It's created and maintained by Square, and caters to image loading and processing. It simplifies the process of displaying images from external locations. In many cases only a few lines of code is required to implement this neat library.

What is the latest version of Picasso?

The latest version is 2.71828. Show activity on this post. Version 2.8 is the latest as of today's post Oct 04 2020 which was released this on Aug 10 2020.


2 Answers

It looks like in the latest Picasso Snapshot that you are using the method with hast been renamed to get see related commit here: https://github.com/square/picasso/commit/e7e919232fe2b15772a7fcd9e15ead2304c66fae

so replace with() with get() and should work.

Since you are using a not yet officially released version, there are no release notes yet, and surprizes like that can happen ;-)

BTW: It seems to be a good name change to me, since a method named "with" but without parameter was a bit weird :-P

like image 90
donfuxx Avatar answered Oct 04 '22 07:10

donfuxx


Use get() Instead of with() it will work

Picasso.get().load("image_URL").into(imageView); 

with() hast been renamed to get()

like image 28
AskNilesh Avatar answered Oct 04 '22 07:10

AskNilesh