[英]Cannot resolve method get() when using the Picasso library
當我嘗試使用 Picasso 庫時,我收到一條錯誤消息,提示“無法解析方法 get()”。 這可能是什么原因?
我已經根據堆棧溢出上此類問題給出的答案嘗試了一些解決方案,但它沒有解決我的問題。
這是我的依賴:
dependencies {
implementation 'com.squareup.picasso:picasso:2.5.2'
}
這是我的 Java 代碼,它拋出錯誤“無法解析方法 get()”:
Picasso.get().load(retrieveProfileImage).into(targetImage);
我設法通過從以下位置更改 Picasso 庫版本來解決錯誤:
implementation 'com.squareup.picasso:picasso:2.5.2'
到:
implementation 'com.squareup.picasso:picasso:2.71828'
我知道這是舊的,但這個答案可能對某人有幫助,我有同樣的問題來解決它,而不是使用 .get()
Picasso.get().load(imageURL).into(imageView);
我使用它使用 .with()
Picasso.with(context).load(imageURL).into(imageView);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.