简体   繁体   中英

Cannot resolve method get() when using the Picasso library

When I try to use the Picasso library, I get an error saying "cannot resolve method get()". What might be the cause of this?

I've tried some solutions based on answers given on this type of question here on stack Overflow, but it didn't solve my problem.

Here is my dependency:

dependencies {
 implementation 'com.squareup.picasso:picasso:2.5.2'
}

Here is my Java code that throws the error "cannot resolve method get()":

Picasso.get().load(retrieveProfileImage).into(targetImage);

I managed to solve the error by changing the Picasso library version from:

implementation 'com.squareup.picasso:picasso:2.5.2' 

to:

implementation 'com.squareup.picasso:picasso:2.71828'

I know this is old but this answer may help of someone, I had the same issue to resolve it instead of using this using .get()

Picasso.get().load(imageURL).into(imageView);

I used it using .with()

Picasso.with(context).load(imageURL).into(imageView);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM