question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version 2.13.2 uses `Method.getParameterCount()` which is not supported on Android before API 26

See original GitHub issue

After updating from jackson 2.13.1 to jackson 2.13.2 I noticed my app no longer worked on Android API 21.

After digging into the code I found the issue at line 187 of AnnotatedMethodCollector.java:

  • version 2.13.1 used m.getParameterTypes().length
  • version 2.13.2 uses m.getParameterCount()

However, the getParameterCount() method requires API 26 on Android.

For now, I’m sticking to version 2.13.1 😄


EDIT: the fix included the official 2.13.3 release

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
finiaszcommented, Mar 9, 2022

Many thanks for your time @cowtowncoder, I’ll check this tomorrow as it’s getting late here in France 😃

0reactions
cowtowncodercommented, Nov 12, 2022

@vitalyster Not fully intentional. I do wish that at least one Android developer had tested one of multiple release candidates so this was uncovered early enough to decide on which path to take.

However, reading through notes I think the idea was to postpone the compatibility change. I’ll add notes to the new issue (#3658)

Read more comments on GitHub >

github_iconTop Results From Across the Web

<uses-sdk> | Android Developers
Lets you express an application's compatibility with one or more versions of the Android platform, by means of an API Level integer.
Read more >
Device compatibility overview - Android Developers
Each successive version of Android provides compatibility for apps that were built using the APIs from previous platform versions, so your app should...
Read more >
Behavior changes: apps targeting API 29+ - Android Developers
Our goal is to make sure that public alternatives are available before we restrict non-SDK interfaces. If you will not be targeting Android...
Read more >
Restrictions on non-SDK interfaces - Android Developers
These restrictions apply whenever an app references a non-SDK interface or attempts to obtain its handle using reflection or JNI. These restrictions were...
Read more >
SDK Platform release notes - Android Developers
Discover release information about the SDK packages available for download from the SDK Manager, in the SDK Platforms tab.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found