For Unity developers building Android apps, Android Studio's APK Analyzer may display a 16 KB page size warning even when all .so libraries pass the ELF alignment check. This article explains why APK Analyzer and Google Play Console can show conflicting results, and how to confirm actual compliance or resolve the APK Analyzer warning using zipalign.
Overview
When building a Unity application that includes the Vivox SDK for Android, Android Studio's APK Analyzer may display a top-level warning stating the APK does not support 16 KB page sizes, even when all native libraries in the build have correct 16 KB ELF alignment. This warning does not necessarily mean your build fails Google Play's 16 KB compliance requirement, and the two tools can produce conflicting results for the same APK.
Cause
Android's 16 KB page size requirement involves two separate alignment checks:
- ELF LOAD segment alignment — the alignment value baked into each
.sobinary at compile time. A value of0x4000(16,384 bytes) in each LOAD segment indicates correct 16 KB alignment. This is the check that Google Play Console enforces. - ZIP packaging offset alignment — the byte offset of each uncompressed
.sofile within the APK ZIP archive. This is a separate packaging-level requirement independent of how the libraries were compiled.
Android Studio's APK Analyzer checks both conditions and reports a top-level 16 KB warning when either fails. Because Google Play Console primarily enforces the ELF LOAD segment check, a build can pass Play Console validation while still triggering the APK Analyzer warning due to a ZIP packaging offset mismatch.
Resolution
There are two approaches depending on whether you need to confirm Play Store compliance or resolve the APK Analyzer warning itself.
To confirm that your build is compliant with Google Play's 16 KB requirement:
- Upload your build to Google Play Console as an internal test release.
- Open the App Bundle Explorer and locate the Memory page size field.
- A value of "Supports 16 KB" confirms compliance regardless of what APK Analyzer reports.
To fix the ZIP packaging offset and eliminate the APK Analyzer warning:
- Build your APK from Unity as normal.
- Locate the
zipaligntool in your Android SDK Build Tools directory. The path is typically<Android SDK>/build-tools/<version>/zipalign. -
Run the following command:
zipalign -p 16 input.apk output.apk
- Open the resulting APK in Android Studio's APK Analyzer. The top-level 16 KB warning should no longer appear.
-p 16 flag aligns uncompressed shared libraries within the ZIP archive to 16 KB offsets. This is a post-build packaging step only — it does not modify the compiled .so files or their ELF LOAD segment alignment.Additional Notes
Updating Android Studio to version 2025.1.3 or later may reduce false positive 16 KB warnings, as that version includes fixes to the alignment check behavior.
This issue is not specific to the Vivox SDK. Any Unity project that includes native Android libraries may encounter it.