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.14.0 uses Method.getParameterCount() which is not supported on Android before API 26

See original GitHub issue

Describe the bug

This previous issue was re-introduced with the usage of getParameterCount in src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java as seen in the release changes.

Version information Which Jackson version(s) was this for?

2.14.0

To Reproduce

Run the following code on a device running Android 24:

ObjectMapper().writeValueAsString(mapOf<String, Any>())

Expected behavior Exception java.lang.NoSuchMethodError: No virtual method getParameterCount()I in class Ljava/lang/reflect/Method; or its super classes (declaration of 'java.lang.reflect.Method' appears in /system/framework/core-oj.jar) is not thrown

Additional context Add any other context about the problem here.

Crashes on Android device running API 24

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
cowtowncodercommented, Nov 14, 2022

Will mark this as closed given that it is basically “works as planned” in that the idea was (but that I had forgotten) to start using specific method in 2.14.

We now finally have actual checking for Android SDK compatibility for databind so that we shouldn’t accidentally break compatibility going forward. But we also need to add notes on what the actual compatibility is, on README – I will file another issue. Similarly for jackson-core.

0reactions
cowtowncodercommented, Nov 15, 2022

You are welcome @jonnycaley !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version 2.13.2 uses Method.getParameterCount() which is not ...
Version 2.13.2 uses Method.getParameterCount() which is not supported on Android before API 26 #3412.
Read more >
<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
Android 10 includes updated system behavior changes that may affect your app. The changes listed in this document apply exclusively to apps that...
Read more >
Meet Google Play's target API level requirement
When you upload an APK, it must meet Google Play's target API level requirements. New apps must target Android 12 (API level 31)...
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