You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
5.19.0 silently bumps the minSdk version on Android to 26 #1730
I was reviewing an automatically generated PR to bump the JNA version on our repo and I saw several CI issues, containing errors like:
ERROR: /home/runner/.gradle/caches/9.2.1/transforms/2800b81311717ffd6b204bc28609c907/transformed/jna-5.19.0-runtime.jar: D8: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26): Lcom/sun/jna/Native;->getWebStartLibraryPath(Ljava/lang/String;)Ljava/lang/String;
Or
Caused by: com.android.tools.r8.internal.g: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26): Lcom/sun/jna/Native$2;->apply(Ljava/util/stream/Stream;)Ljava/lang/Class;
Our app uses minSdk 24, so it was failing to build. I took a look at the latest changes in JNA since 5.18.1 and I couldn't find any that could explain it, since the mentioned code hasn't been changed in years in some cases. I've attached the whole error log:
Activity
matthiasblaesing commentedon Jun 10, 2026
That would be most probably this:
#1638
matthiasblaesing commentedon Jun 10, 2026
@jmartinesp please have a look at #1731. Can you build from source and test that or do you need a prebuilt
.aar?jmartinesp commentedon Jun 11, 2026
Oh, that was fast, thanks! If possible, an
aarwould be great.matthiasblaesing commentedon Jun 11, 2026
@jmartinesp please use this build: https://central.sonatype.com/repository/maven-snapshots/net/java/dev/jna/jna/5.19.1-SNAPSHOT/jna-5.19.1-20260611.183553-1.aar
jmartinesp commentedon Jun 12, 2026
I just tested it and it seems to be working fine. Thanks again!
Restore support for Android versions not supporting MethodHandles
matthiasblaesing commentedon Jun 12, 2026
@jmartinesp thanks for testing!
matthiasblaesing commentedon Jun 12, 2026
Release is done and central status report it being already available.