-
Notifications
You must be signed in to change notification settings - Fork 175
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
Version 2.9.7 breaks compatibility with Android minSdk < 24 #176
Comments
This issue just caused me a lot of pain. It was only after figuring out the problem myself that I discovered this bug report. |
I have the same issue but I can't revert to 2.9.6 since I need the fix from the issue #168. EDIT: The method usages can be replaced safely apparently with annotations.firstOrNull { it.annotationClass == JsonProperty::class }?.let { it as JsonProperty }?.required I don't have experience with open source projects that's why I post here the answer. |
- credits to @frnusmartobjects for suggested fix
Is the fix going to be included in 3.0.0? |
Looks like the solution to this is if you want 1.3 Kotlin + Android 21+ then you need to use Moshi or GSON. |
Yeah, I gave up waiting for a solution so I switched over to Moshi. |
Well, that would suck - refactoring jackson out just because that small fix is not implemented. |
@alashow sure, but seen as Moshi can also generate adapters for you and not require the use of the reflect library, it is a better choice in most cases for Android dev. |
Moshi is more lightweight than Jackson and helped reduce the overall size of the app I work on. This was significant as we were trying to create a version that's below the 4MB limit for an instant app. |
Aside from Moshi which is a fine library too, I would recommend checking out https://github.com/FasterXML/jackson-jr Jackson-jr uses Jackson's streaming ( I haven't gotten as much feedback on |
…droid API < 24
By using the method
getAnnotationsByType
in commit 0d4ab3b this library breaks compatibility with Android versions with minSdk < 24See https://developer.android.com/studio/write/java8-support#supported_features for more information.
I've reverted to v2.9.6 in the meantime.
The text was updated successfully, but these errors were encountered: