Aliya
Aliya

Reputation: 1178

Picasso detected an unsupported OkHttp on the classpath

I am using Picasso 2.3.2 and okhttp 1.5.4

Initially I was getting this 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)

Then I updated the pom with com.squareup.okhttp:okhttp:1.6.0 (ran mvn clean install, reimported maven in IntelliJ), but the crash still happens.

Anybody knows how to fix this?

Upvotes: 9

Views: 7777

Answers (4)

ked
ked

Reputation: 2456

i update the version of picasso library and it worked. refer website for latest version http://square.github.io/picasso/

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

Upvotes: 0

Amol Dale
Amol Dale

Reputation: 231

I am Facing same problem. I resolve this issue by using

 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'

Upvotes: 0

Mansukh Ahir
Mansukh Ahir

Reputation: 3563

i face same problem. Must use both okhttp and okhttp-urlconnection. I use this three lib. and then it work properly

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'

try it. Good luck.

Upvotes: 8

Aliya
Aliya

Reputation: 1178

Answer is here: https://github.com/square/picasso/issues/541

Must use both okhttp and okhttp-urlconnection, until OkHttp 2.0 final is out.

Upvotes: 4

Related Questions