diff --git a/iris/android-app/build-apk.sh b/iris/android-app/build-apk.sh index 19f94e0..7d4b8f2 100755 --- a/iris/android-app/build-apk.sh +++ b/iris/android-app/build-apk.sh @@ -57,6 +57,18 @@ export ANDROID_NDK_HOME="$NDK_DIR" # finds -- a debug x86_64 emulator build left behind made an arm64 "release" # 339 MB on 2026-09-06. rm -rf app/src/main/jniLibs +# ...and Gradle's own copy of them, which `rm -rf jniLibs` does not reach. +# `mergeReleaseNativeLibs` is *up to date* against its cached inputs, so a +# build that switches ABI packages the previous ABI: an `--abi x86_64` +# release APK containing `lib/arm64-v8a/libmain.so` installed fine and +# aborted at startup with `Could not get adapter!: NotFound { +# active_backends: VULKAN }` under libndk_translation -- which reads +# exactly like the phone's own Vulkan problem and is nothing of the kind. +# Scoped to the merge task's directory rather than all of `app/build`, so +# an ABI change costs the native merge and not the whole Gradle build. +rm -rf app/build/intermediates/merged_native_libs \ + app/build/intermediates/stripped_native_libs \ + app/build/intermediates/merged_jni_libs echo "build-apk.sh: cargo ndk -t $ABI build ${BUILD_TYPE:+(${BUILD_TYPE})} --features \"$FEATURES\"" if [ "$BUILD_TYPE" = "release" ]; then cargo ndk -t "$ABI" -P 29 -o app/src/main/jniLibs/ build --release --features "$FEATURES"