9

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)

次に、com.squareup.okhttp:okhttp:1.6.0 (mvn クリーン インストールを実行し、IntelliJ で maven を再インポート) で pom を更新しましたが、クラッシュは引き続き発生します。

誰でもこれを修正する方法を知っていますか?

4

4 に答える 4

8

私は同じ問題に直面しています。との両方okhttpを使用する必要がありokhttp-urlconnectionます。私はこの3つの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'

それを試してみてください。幸運を。

于 2015-08-19T09:46:14.970 に答える
4

答えはこちら: https://github.com/square/picasso/issues/541

OkHttp 2.0 final がリリースされるまで、okhttp と okhttp-urlconnection の両方を使用する必要があります。

于 2014-06-09T18:45:05.627 に答える
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'
于 2016-01-14T06:52:24.360 に答える