Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 588
Aliya Avatar asked Jun 09 '14 17:06

Aliya


2 Answers

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.

like image 181
Mansukh Ahir Avatar answered Nov 15 '22 22:11

Mansukh Ahir


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

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

like image 33
Aliya Avatar answered Nov 15 '22 22:11

Aliya