Back

OKHttp Library Error while building the Android Application in newer version.

  • 1
  • Android
عبد الرحمن
30 Dec, 2023, 15:46

This bug is already reported here https://github.com/appwrite/sdk-for-android/issues/42 can we solve this? If I have to change things in the android sdk do I need to regenerate the sdk from the sdk generator? I cannot downgrade the gradle version which is the only solution provided on the GitHub Isue. I need this to work in the newer versions so I was planning to clone the android sdk myself and see if I can solve this in there. Do I need to go cloning route and chaning the sdk itself or do I have to create a new sdk from the sdk generator. I am new to both and not sure which require less work to do and could solve my problem in the most easiest and correct way. Rather then downgrading the AGP.

TL;DR
There is an error with the OKHttp library while building an Android application in a newer version. The issue is related to downward compatibility. One suggestion is to change the groovy to KTS, but it is uncertain if this change will support old versions. Another suggestion is to update the OkHttp version to 4.12.0. It is also recommended to upgrade the SDK library and the AGP in the project for easier work. A bug has been reported on GitHub, but the only solution provided is to downgrade the gradle version. The user is unsure whether to clone the Android SDK and make changes or create a new SDK from
Drake
30 Dec, 2023, 23:40

@dlohani, do you know much about this?

dlohani
31 Dec, 2023, 01:36

I'll look into it

عبد الرحمن
31 Dec, 2023, 10:50

Thank you so much for such a quick solution. Any expected time for this pull request to be merged?

عبد الرحمن
31 Dec, 2023, 10:55

Would it be enough to just update the okkhttp version api(platform("com.squareup.okhttp3:okhttp-bom:4.12.0")) isn't it better to upgrade the sdk library build with latest gradle build as well? I downloaded the library and tryed building but android studio suggest to upgrade the gradle for the appwrite-android-sdk to newer versions. isn't it better idea to upgrade the AGP in the project so it will be easier to work with?

dlohani
31 Dec, 2023, 10:56

Noted.

dlohani
31 Dec, 2023, 10:56

Thank you

عبد الرحمن
31 Dec, 2023, 11:01

I would like to be part of this. If possible? Also what if change it to grovy to kts?

dlohani
31 Dec, 2023, 11:13

Changing groovy to KTS, Would that also support old versions? If you want to contribute, you can create a PR on https://github.com/appwrite/sdk-generator/tree/lohanidamodar-patch-2 this branch

عبد الرحمن
31 Dec, 2023, 11:25

Yes, Downward compatibility could be an issue.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more