CameraX 1.3.4 (May 2024) ships `libimage_processing_util_jni.so`
with 0x1000 (4 KB) ELF LOAD alignment. Android 15's 16-KB page
requirement rejects that — the user hit "elf alignment check failed"
on device. 1.4.0+ corrected the linker flags; 1.4.2 is the current
stable.
Also adds `camera-video` to the dep set so Phase 4b can use
`VideoCapture<Recorder>` without another bump.
Verified post-bump:
$ zipalign -v -c -p 16 app-release.apk → all lib/*/*.so (OK)
$ llvm-readelf -l libimage_processing_util_jni.so →
LOAD … 0x4000 (16 KB) on all four ABIs.
69 lines
1.7 KiB
Groovy
69 lines
1.7 KiB
Groovy
group 'io.swipelab.ux'
|
|
version '1.0-SNAPSHOT'
|
|
|
|
buildscript {
|
|
ext.kotlin_version = '1.9.22'
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.1.0'
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
rootProject.allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
android {
|
|
namespace 'io.swipelab.ux'
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
minSdk 21
|
|
externalNativeBuild {
|
|
cmake {
|
|
cppFlags ""
|
|
}
|
|
}
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "src/main/jni/CMakeLists.txt"
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// CameraX for scanner preview + frame analysis + ux.camera.
|
|
// 1.4.0+ ships 16-KB-aligned `libimage_processing_util_jni.so`
|
|
// (Android 15 requirement); 1.3.x failed the elf-alignment check.
|
|
def cameraxVersion = '1.4.2'
|
|
implementation "androidx.camera:camera-core:$cameraxVersion"
|
|
implementation "androidx.camera:camera-camera2:$cameraxVersion"
|
|
implementation "androidx.camera:camera-lifecycle:$cameraxVersion"
|
|
implementation "androidx.camera:camera-view:$cameraxVersion"
|
|
implementation "androidx.camera:camera-video:$cameraxVersion"
|
|
// Pure-Kotlin/Java QR decoder. ~470 KB jar, no Play Services dep.
|
|
implementation 'com.google.zxing:core:3.5.3'
|
|
}
|