Skip to content

5.19.0 silently bumps the minSdk version on Android to 26 #1730

Closed

Description

@jmartinesp

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:

minSdk26.txt

Activity

  1. matthiasblaesing commented on Jun 10, 2026

    @matthiasblaesing
    Member

    That would be most probably this:

    #1638

  2. matthiasblaesing commented on Jun 10, 2026

    @matthiasblaesing
    Member

    @jmartinesp please have a look at #1731. Can you build from source and test that or do you need a prebuilt .aar?

  3. jmartinesp commented on Jun 11, 2026

    @jmartinesp
    Author

    Oh, that was fast, thanks! If possible, an aar would be great.

  4. jmartinesp commented on Jun 12, 2026

    @jmartinesp
    Author

    I just tested it and it seems to be working fine. Thanks again!

  5. added a commit that references this issue on Jun 12, 2026
    4ba086b
  6. matthiasblaesing commented on Jun 12, 2026

    @matthiasblaesing
    Member

    @jmartinesp thanks for testing!

  7. matthiasblaesing commented on Jun 12, 2026

    @matthiasblaesing
    Member

    Release is done and central status report it being already available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions