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

来源:互联网 发布:非农历史数据统计 编辑:程序博客网 时间:2024/06/16 05:35

http://blog.csdn.net/github_36875356/article/details/54178751


在使用OKHttp的时候,加入Picasso,会出现错误:

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)


解决方法:

在写依赖库的时候要写三个:
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'

0 0
原创粉丝点击