OkHttp recently received a v5 update, meaning there are breaking changes. I've noticed these breaking changes, as my project no longer recognizes OkHttp or any of its classes.
Unfortunately is the changelog and README of OkHttp only really displaying info regarding a Gradle-based setup, which I don't use. I use Maven instead and currently have the dependency defined like this:
<dependencies>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>5.0.0</version>
</dependency>
</dependencies>
Am I missing something like an additional dependency or include/exclude specifications?
After finding an issue on their GitHub with the same problem I was able to solve the problem by depending on the `okhttp-jvm` dependency instead, as Maven doesn't seem to have the same "awareness" for module metadata as Gradle does.
So, if you're using Maven and get the same issue, try changing the okhttp
artifact ID to okhttp-jvm
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With