-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoSuchMethodError: okhttp3.HttpUrl.get(Ljava/lang/String;)Lokhttp3/HttpUrl; #3058
Comments
Use OkHttp 3.12.2 or newer. |
And the pom declares a dependency on that version so if it wasn't present you like have a misconfiguration on the side of your build system which we can't control. |
Update Solved: I had another library, which was dependant upon OkHttp:3.8.0 and so this was being used and causing the issue. When I do not use this library I can use say OkHttp:3.14.9 (same for the logging interceptor) and upgrade retrofit to version 2.6.0 or above. Hi, Currently my project is using:
I tried to move the retrofit & gson converter library to version 2.6.0 or 2.9.0, however I then get the error:
I tried upgrading all of the libraries to their latest versions, but I still get the same error. Any ideas on where I'm going wrong?
|
I tried all of these solutions but with no benefits unfortunately. |
when I set baseUrl,I got a problem :
java.lang.NoSuchMethodError: okhttp3.HttpUrl.get(Ljava/lang/String;)Lokhttp3/HttpUrl;
This problem only happened when I used version 2.5 , if I uesd 2.4 ,it is OK.
I have solved this problem , the okhttp version mismatch the retrofit version, when I used both the newest version , this problem is solved
The text was updated successfully, but these errors were encountered: