在OkHttp的使用过程中出现下列问题Picasso detected an unsupported OkHttp on the classpath.

来源:互联网 发布:淘宝手持身份证照片 编辑:程序博客网 时间:2024/06/06 09:06
在写依赖库的时候要写三个:
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'
写不全的会出现以下错误:
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)
0 0