Reputation: 1056
We ran into a bug in our react-native project that is related to the okhttp library on android.
RN uses okhttp 3.12.1, while the bug we encountered was fixed in 3.14.4. I added the dependencies to my andorid/app/build.gradle file.
implementation("com.squareup.okhttp3:okhttp:3.14.9")
implementation("com.squareup.okhttp3:okhttp-urlconnection:3.14.9")
Everything seems to work fine.
Is this the correct way to do it. Are there any obvious issues I might run into with this?
I'm sorry that this is not a typical q/a question. But I'm not sure where the correct place for this question is.
Upvotes: 2
Views: 2585
Reputation: 40623
Note that OkHttp versions greater than 3.12.x require Android 5+.
One issue is that OkHttp 3.14.x is no longer supported. Only 3.12.x and 4.x get security fixes. And 4.x is the only line getting big fixes.
Upgrading to OkHttp 4.x is safe and easy.
Upvotes: 4