【问题标题】:Picasso: set an older version of OkHttp3Picasso:设置旧版本的 OkHttp3
【发布时间】:2020-10-23 21:43:57
【问题描述】:

在我们的 Android 应用程序中,我们广泛使用了使用 okhttp3 库的 Picasso 库。

问题是最近 okhttp3 需要 minsdk 21,而我们的应用需要从 19 开始,所以我想在使用 Picasso 时设置旧版本的 okhttp3 lib(支持 19 的 3.12.X)。

有什么办法可以做到吗?

【问题讨论】:

  • 看起来 Picasso 正在向 Kotlin master 迁移,所以未来的版本可能会改变版本范围。
  • @Stack Diego,成功了吗?
  • @Bhavnik 是的,谢谢

标签: android okhttp picasso


【解决方案1】:

你可以试试这个吗?

implementation ('com.squareup.picasso:picasso:(VERSION)') {
    exclude group: 'Your OKHTTP package'
}

然后添加你自己的OKHTTP版本

【讨论】:

  • 实际上我必须使用关键字“strictly”才能使其工作: implementation('com.squareup.okhttp3:okhttp') { version { strict '3.12.12' } }
  • 我是否需要在排除组代码行中添加以上行或在该实现块之外添加?
猜你喜欢
  • 2016-10-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多