-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Error on retrofit when add dependencies of okhttp #4622
Comments
OkHttp 3.13 requires Java 8. You need to enable it in your build configuration. See: #4597 (comment) |
Thanks for your reply sir, I have added this
to my build gradle file, but I still have same error output. Is there any additional step for this? |
You put that at the top-level or inside the Android block?
…On Fri, Feb 15, 2019, 10:06 PM Cipher Deprogres ***@***.*** wrote:
Thanks for your reply sir, I have added this
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
to my build gradle file,but I still have same error output. Is there any
additional step for this?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#4622 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEEESfDFmfs6jjYow7-XCQqESGg8wvBks5vN3WbgaJpZM4a-gA2>
.
|
I put inside android block sir, if I put it outside there Gradle error. |
okhttp above 3.13 has a problem with Android4.4( about ssl ), so use 3.12.1( or under) prevent this problem. |
Same problem. This is because:
https://medium.com/square-corner-blog/okhttp-3-13-requires-android-5-818bb78d07ce The only way is use OkHttp 3.12.x if your minSDK lower 21. P.S. It is not clear why the OkHttp developers did not raise the major version, given such major changes. |
+1 |
Read more about here: square/okhttp#4622
If you guys are still crashing on Android 4 using the latest
|
Just downgrade Retrofit to |
Thank you so so much! |
Update version OK-Https implementation ("com.squareup.okhttp3:okhttp:4.9.0") |
Hello, when I am using Retrofit without Okhttp dependencies, its working fine, but when I want to add okhttp for logging to my dependencies.
It show error in my logcat:
No problem when I using retrofit only
The text was updated successfully, but these errors were encountered: