Skip to content
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

jacson 2.14 does not work on Android API < 26 #3702

Closed
Bixilon opened this issue Dec 18, 2022 · 8 comments
Closed

jacson 2.14 does not work on Android API < 26 #3702

Bixilon opened this issue Dec 18, 2022 · 8 comments
Labels
to-evaluate Issue that has been received but not yet evaluated

Comments

@Bixilon
Copy link

Bixilon commented Dec 18, 2022

Hi,
I am using jackson on android 7, the problem is that the commit (326bb86) breaks some things, because the Method Method::getParameterCount does not exist.

It happens in e.g. https://github.com/FasterXML/jackson-databind/blob/2.15/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedMethodCollector.java#L187

This is a followup of pretty much exactly FasterXML/jackson-module-kotlin#176

Please revert the commit or abstract it and handle it with try {} catch(NoSuchMethodException) { }

Thanks!

@Bixilon Bixilon added the to-evaluate Issue that has been received but not yet evaluated label Dec 18, 2022
@pjfanning
Copy link
Member

Have you tried https://github.com/FasterXML/jackson-jr instead?

@Bixilon
Copy link
Author

Bixilon commented Dec 18, 2022

No, why should I? I don't have the needs of them.

@yawkat
Copy link
Member

yawkat commented Dec 18, 2022

duplicate of #3658, jackson 2.14 only works on API >=26

@cowtowncoder cowtowncoder changed the title Crash on Android API < 24 jacson 2.14 does not work on Android API < 24 Dec 19, 2022
@cowtowncoder cowtowncoder changed the title jacson 2.14 does not work on Android API < 24 jacson 2.14 does not work on Android API < 26 Dec 19, 2022
@cowtowncoder
Copy link
Member

@Bixilon This change was unintentional wrt Android compatibility -- and as a result we added a compatibility checker and documented current baseline. CI will verify that we will abide by it, too:

https://github.com/FasterXML/jackson-databind/

However, as to 2.14 minimum Android level that became 26 and I have no intention of reverting those changes.

@Bixilon
Copy link
Author

Bixilon commented Dec 19, 2022

However, as to 2.14 minimum Android level that became 26 and I have no intention of reverting those changes.

If I PR this and use a static method that checks (one time) if the method is available and if so, uses it, otherwise fallsback, would you accept it?

@cowtowncoder
Copy link
Member

@Bixilon I appreciate your help, but no: at this point I do not want a workaround for use of this method. While the way it came about was unfortunate (during 2.13.x development), decision was made to just use the new method with 2.14.

To use Jackson on earlier Android SDK versions, it will be necessary to stay on Jackson 2.13 (latest 2.13.5 should have no issues).

For background, see: #3412, #3658 and #3661.

@Bixilon
Copy link
Author

Bixilon commented Dec 19, 2022

I read through it, but still don't see the exact reason why < 26 should be deprecated, I still got one device with Android 7. But you could argue that workarounds are bad and those API versions only share less then 3% of total market share (see https://gs.statcounter.com/os-version-market-share/android)

Still thanks!

Moritz

@cowtowncoder
Copy link
Member

@Bixilon yes, sorry about that. Reasoning really is that eventually we will want to move on and not use various workarounds, exactly as you were speculating.

The main fail here was that upgrade was unintentional, unplanned. But given that there are now multiple released patch versions it seems simplest to go with a new stable baseline and rely on AnimalSniffer-based verification to make sure in future we upgrade when we want/plan to, not accidentally.

NyxTrail added a commit to NyxTrail/aksharam that referenced this issue Jan 1, 2023
- Newer (than 2.13.x) versions of jackson does not work on API level < 26 in android
  FasterXML/jackson-databind#3702
- Unlinked LettersTabViewModel and Transliterator instantiation
  Transliterator instantiation now uses fragment context instead of
  application context
NyxTrail added a commit to NyxTrail/aksharam that referenced this issue Jan 1, 2023
- Newer (than 2.13.x) versions of jackson does not work on API level < 26 in android
  FasterXML/jackson-databind#3702
- Unlinked LettersTabViewModel and Transliterator instantiation
  Transliterator instantiation now uses fragment context instead of
  application context
NyxTrail added a commit to NyxTrail/aksharam that referenced this issue Jan 1, 2023
- Newer (than 2.13.x) versions of jackson does not work on API level < 26 in android
  FasterXML/jackson-databind#3702
- Unlinked LettersTabViewModel and Transliterator instantiation
  Transliterator instantiation now uses fragment context instead of
  application context
- Removed unused references to previously tested progress bar
oleksandrvolovyk added a commit to oleksandrvolovyk/guerrilla-mail-android-client that referenced this issue Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-evaluate Issue that has been received but not yet evaluated
Projects
None yet
Development

No branches or pull requests

4 participants