【问题标题】:Picasso library error unresolved reference毕加索图书馆错误未解决参考
【发布时间】:2018-06-30 03:27:45
【问题描述】:
   if(!image!!.equals("default")){
        Picasso.with( applicationContext )
           .load("image")
           .placeholder(R.drawable.profile_img)
           .into(settingsProfileId)
   }

出现错误unresolved reference 如何解决这个错误

【问题讨论】:

  • 你用的是哪个版本的毕加索
  • 我对@9​​87654323@ 也有同样的看法。 Android Studio 显示Unresolved reference: get

标签: android kotlin picasso


【解决方案1】:

您使用的是旧版本,您需要更新您的库...

See more details.

在 Gradle 中

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

Java:

Picasso.get() .load(url) .resize(50, 50) .centerCrop() .into(imageView)

【讨论】:

  • 在这个版本中如何使用applicationContext和get方法?这就是为什么我使用以前的版本
  • 与“2.5.2”相比,这是一个奇怪的版本。由于奇怪,我一直坚持下去,直到我检查了 github 发布列表中的 picasso
【解决方案2】:

所以我得到了答案 错误是 .with 函数不支持 Picasso 库版本 7.3 所以要解决它更改为较低版本 实现 'com.squareup.picasso:picasso:2.4.0'

【讨论】:

  • 或者直接使用新提供的Picasso.get()
猜你喜欢
  • 1970-01-01
  • 2014-10-10
  • 2014-10-29
  • 2014-10-02
  • 1970-01-01
  • 2016-04-18
  • 2020-02-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多