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

Ali*_*iya 9 android picasso okhttp

我正在使用Picasso 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)
Run Code Online (Sandbox Code Playgroud)

然后我用com.squareup.okhttp更新了pom:okhttp:1.6.0(运行mvn clean install,在IntelliJ中重新导入maven),但崩溃仍然发生.

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

Man*_*hir 8

我面临同样的问题.必须同时使用okhttpokhttp-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'
Run Code Online (Sandbox Code Playgroud)

试试吧.祝好运.


Ali*_*iya 4

答案在这里: https: //github.com/square/picasso/issues/541

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

  • 2.0 Final 也需要它。 (2认同)