Version 2.14.0 uses Method.getParameterCount() which is not supported on Android before API 26
See original GitHub issueDescribe 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:
- Created 10 months ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
.You are welcome @jonnycaley !