-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
When using ML Kit barcode-scanning library v16.2.0 and targeting Android 15 (API level 35), Android studio outputs a warning :
The native library arm64-v8a/libbarhopper_v2.so
(from com.google.mlkit:barcode-scanning:16.2.0
) is not 16 KB aligned
Starting November 1st, 2025, Google Play will reject new apps or updates that do not comply with the 16 KB page size requirement:
https://developer.android.com/16kb-page-size
I'm aware that the library is compatible with 16 KB page size if I upgrade to v17.3.0. However, due to the issue mentioned in #367 was not resolved, we are unable to upgrade to that version.
Can you recommend how we should proceed with this? Is it possible to recompile the native library for v16.2.0?
To Reproduce
Create an Android project.
Add the ML Kit barcode-scanning dependency in build.gradle - implementation 'com.google.mlkit:barcode-scanning:16.2.0'
Set compileSdk and targetSdk to 35.
Use AGP 8.5+ and Gradle 8.3+.
Observe the warning in the problems window.
Expected behavior
The ML Kit barcode-scanning library should have their LOAD segments aligned at 16 KB (0x4000) boundaries, per Play policy.
π§ Actual Behavior
The affected libbarhopper_v2.so file appear to have default alignment (e.g., 4 KB), which results in compatibility issues with devices using a 16 KB page size.
SDK Info:
com.google.mlkit:barcode-scanning:16.2.0