Android 毕加索在类路径上检测到不受支持的OkHttp

Android 毕加索在类路径上检测到不受支持的OkHttp,android,picasso,okhttp,Android,Picasso,Okhttp,我正在使用毕加索2.3.2和okhttp 1.5.4 最初,我得到了这个RTE: java.lang.RuntimeException: Picasso detected an unsupported OkHttp on the classpath. To use OkHttp with this version of Picasso, you'll need: 1. com.squareup.okhttp:okhttp:1.6.0 (or newer) 2. com.squareup.okht

我正在使用毕加索2.3.2和okhttp 1.5.4

最初,我得到了这个RTE:

java.lang.RuntimeException: Picasso detected an unsupported OkHttp on the classpath.
To use OkHttp with this version of Picasso, you'll need:
1. com.squareup.okhttp:okhttp:1.6.0 (or newer)
2. com.squareup.okhttp:okhttp-urlconnection:1.6.0 (or newer)
Note that OkHttp 2.0.0+ is supported!
        at com.squareup.picasso.Utils.createDefaultDownloader(Utils.java:246)
        at com.squareup.picasso.Picasso$Builder.build(Picasso.java:596)
        at com.squareup.picasso.Picasso.with(Picasso.java:473)
然后我用com.squareup.okhttp:okhttp:1.6.0更新了pom(运行mvn清理安装,在IntelliJ中重新导入maven),但崩溃仍然发生

有人知道如何解决这个问题吗?

答案如下:

必须同时使用okhttp和okhttp urlconnection,直到okhttp 2.0最终版发布。

我面临同样的问题。 必须同时使用
okhttp
okhttp-urlconnection
。 我使用这三个lib。然后它就能正常工作了

compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
compile 'com.squareup.picasso:picasso:2.4.0'

试试看。祝你好运。

我也面临同样的问题。我通过使用

 compile 'com.squareup.okhttp3:okhttp:3.0.0-RC1'
 testCompile 'com.squareup.okhttp3:mockwebserver:3.0.0-RC1'
 compile 'com.squareup.picasso:picasso:2.5.2'

我更新了毕加索图书馆的版本,它成功了。 有关最新版本,请访问网站


2.0 final也需要它。你有没有找到okhttp urlconnection的gradle依赖项?对我来说,我使用的是okhtttp3。我已经更新了毕加索。工作正常
implementation 'com.squareup.picasso:picasso:2.71828'