Android 16 KB fix map

JNA 16 KB page-size fix: upgrade to 5.16.0

Artifact net.java.dev.jna:jna · measured 2026-10-01 · all libraries

fixed

JNA versions up to and including 5.15.0 that we measured ship 4 KB-aligned native libraries (offending for Google Play's 16 KB page-size requirement). The first measured aligned stable version is 5.16.0; the newest measured, 5.19.1, is aligned.

Caveats

Measured evidence

VersionLibrary filep_alignFile dateSource
Last offending5.15.0jni/x86_64/libjnidispatch.so4 KB (2^12)Sun, 15 Sep 2024 15:54:55 GMTartifact
First aligned5.16.0jni/arm64-v8a/libjnidispatch.so16 KB (2^14)Sun, 22 Dec 2024 10:08:29 GMTartifact

p_align is the smallest PT_LOAD segment alignment of the ELF. 16 KB-compatible needs at least 16384 (2^14). Method: min PT_LOAD p_align of arm64-v8a/x86_64 .so inside the published AAR/JAR; aligned = >=16384 for every lib. Dates are repository file times, not official release dates.

Offending versions measured (10)

4.5.0, 5.0.0, 5.2.0, 5.3.1, 5.6.0, 5.8.0, 5.10.0, 5.12.1, 5.14.0, 5.15.0

Native libraries seen: libjnidispatch.so.

The Gradle change

implementation("net.java.dev.jna:jna:5.16.0")

an aligned version, lowest measured above the last offending one; newer measured versions are aligned too (latest 5.19.1). Check: ./gradlew :app:dependencyInsight --dependency jna --configuration releaseRuntimeClasspath // ARCHITECTURE-SPECIFIC: the last offending measurement 5.15.0 is x86_64-only; its arm64-v8a libraries are aligned

Confirm what Gradle actually resolves, since another dependency may pull an older version:

./gradlew :app:dependencyInsight --dependency jna --configuration releaseRuntimeClasspath

Re-verify it yourself

Download the artifact and run the free checker (check16k.py, Python 3, no dependencies):

curl -LO https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.16.0/jna-5.16.0.aar
python3 check16k.py jna-5.16.0.aar

Exit 0 = aligned, 1 = an unaligned library found. Better still, run it on your final .aab/.apk.

Need the full map for every library, not just JNA?

The paid kit ($12, v2) contains the complete measured fix map for all 80+ libraries as JSON and a table, every raw per-version measurement, the spot-check evidence, and the step-by-step guide for Play's 16 KB requirement. This page and the checker script stay free.

Get the kit ($12)