googlesamples / googlesamples/mlkit

[Bug report] ML Kit barcode-scanning library v16.2.0 for 16 KB Page Size Compatibility

Open
#976 16 comments 6 reactions 1 assignee Claimed by @heytsai View on GitHub
Dominant language
Kotlin
Stars
4.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

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 https://github.com/googlesamples/mlkit/issues/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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.