本文介绍了毕加索检测到不支持OkHttp在classpath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的毕加索2.3.2和1.5.4 okhttp
I am using Picasso 2.3.2 and okhttp 1.5.4
起初我得到这个RTE:
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)
然后我更新了POM与com.squareup.okhttp:okhttp:1.6.0(RAN MVN全新安装,重新导入行家中的IntelliJ),但崩溃仍然发生
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?
推荐答案
答案就在这里: https://github.com/square/picasso/issues/541
必须同时使用okhttp和okhttp-的URLConnection,直到OkHttp 2.0最终出局了。
Must use both okhttp and okhttp-urlconnection, until OkHttp 2.0 final is out.
这篇关于毕加索检测到不支持OkHttp在classpath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!