You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using com.google.mlkit:barcode-scanning:17.3.0, the release build fails alignment verification on Android Gradle Plugin (AGP) 8.5.1 due to native .so libraries not being aligned to 16KB as required. This leads to the following warning in the build log:
Task :app:stripReleaseDebugSymbols
Unable to strip the following libraries, packaging them as they are:
libbarhopper_v3.so, libimage_processing_util_jni.so, libsurface_util_jni.so
This violates ELF alignment requirements introduced in AGP 8.5+, affecting reproducible and compliant builds.
To Reproduce
Steps to reproduce the behavior in a sample Android app:
Add ML Kit dependency: implementation 'com.google.mlkit:barcode-scanning:17.3.0'
Build a release APK using AGP 8.5.1
Observe build logs or run alignment verification with check_elf_alignment.sh
See ELF alignment errors on .so files
Expected behavior
The native .so libraries (libbarhopper_v3.so, libimage_processing_util_jni.so, libsurface_util_jni.so) should be aligned to 16KB (2¹⁴) so that AGP 8.5+ builds can strip symbols and package them correctly without warnings or errors.
SDK Info:
-SDK Name & Version: com.google.mlkit:barcode-scanning:17.3.0
Smartphone:
Device/Simulator: Pixel 6, emulator also affected
Device/Simulator OS: Android 14 (API 34), also tested on Android 13
Development Environment:
IDE Version: Android Studio Meerkat | 2024.3.1
Laptop/Desktop: MacBook Pro (M2, 2022)
Laptop/Desktop OS: macOS 14.4 Sonoma
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When using com.google.mlkit:barcode-scanning:17.3.0, the release build fails alignment verification on Android Gradle Plugin (AGP) 8.5.1 due to native .so libraries not being aligned to 16KB as required. This leads to the following warning in the build log:
This violates ELF alignment requirements introduced in AGP 8.5+, affecting reproducible and compliant builds.
To Reproduce
Steps to reproduce the behavior in a sample Android app:
Add ML Kit dependency:
implementation 'com.google.mlkit:barcode-scanning:17.3.0'
Build a release APK using AGP 8.5.1
Observe build logs or run alignment verification with check_elf_alignment.sh
See ELF alignment errors on .so files
Expected behavior
The native .so libraries (libbarhopper_v3.so, libimage_processing_util_jni.so, libsurface_util_jni.so) should be aligned to 16KB (2¹⁴) so that AGP 8.5+ builds can strip symbols and package them correctly without warnings or errors.
SDK Info:
-SDK Name & Version: com.google.mlkit:barcode-scanning:17.3.0
Smartphone:
Device/Simulator: Pixel 6, emulator also affected
Device/Simulator OS: Android 14 (API 34), also tested on Android 13
Development Environment:
IDE Version: Android Studio Meerkat | 2024.3.1
Laptop/Desktop: MacBook Pro (M2, 2022)
Laptop/Desktop OS: macOS 14.4 Sonoma
The text was updated successfully, but these errors were encountered: