What actually happened?
AGP 9 removed the built-in sourceSets.main.shaders compilation step, so with AGP 9 (RN 0.87 template / Gradle 9) react-native-vision-camera-resizer's Resizer.comp is never compiled and shaders/Resizer.comp.spv is missing from the APK. The first resize() on Android then throws from VulkanShaderAssetLoader because AAssetManager_open can't find the asset.
Steps to reproduce
Repro: any app on AGP 9.x using the resizer, call resize() on an Android device — fails on the shader load; the same code works on AGP 8.
What did you expect to happen?
Resizer.comp.spv is packaged in the APK and resize() works as it does on AGP 8.
Additional context
I've been running a local workaround: a Gradle Exec task in the resizer's android/build.gradle that invokes the NDK's glslc (shader-tools/<host>/glslc) at build time, writes the SPIR-V into a generated assets directory added to main.assets.srcDirs, and is wired as a dependency of every merge*Assets task. Happy to send that as a PR if it's the direction you'd like — or, if you'd rather not depend on the NDK's shader tools at build time, committing the compiled .spv as an asset is the other option.
Affected platforms
Android (device)
VisionCamera version
5.2.3 (react-native-vision-camera-resizer 5.2.3)
React Native version
0.87
React Native architecture
New Architecture (Fabric / bridgeless)
Features being used
Frame Processors (worklets)
What actually happened?
AGP 9 removed the built-in
sourceSets.main.shaderscompilation step, so with AGP 9 (RN 0.87 template / Gradle 9)react-native-vision-camera-resizer'sResizer.compis never compiled andshaders/Resizer.comp.spvis missing from the APK. The firstresize()on Android then throws fromVulkanShaderAssetLoaderbecauseAAssetManager_opencan't find the asset.Steps to reproduce
Repro: any app on AGP 9.x using the resizer, call
resize()on an Android device — fails on the shader load; the same code works on AGP 8.What did you expect to happen?
Resizer.comp.spvis packaged in the APK andresize()works as it does on AGP 8.Additional context
I've been running a local workaround: a Gradle
Exectask in the resizer'sandroid/build.gradlethat invokes the NDK'sglslc(shader-tools/<host>/glslc) at build time, writes the SPIR-V into a generated assets directory added tomain.assets.srcDirs, and is wired as a dependency of everymerge*Assetstask. Happy to send that as a PR if it's the direction you'd like — or, if you'd rather not depend on the NDK's shader tools at build time, committing the compiled.spvas an asset is the other option.Affected platforms
Android (device)
VisionCamera version
5.2.3 (react-native-vision-camera-resizer 5.2.3)
React Native version
0.87
React Native architecture
New Architecture (Fabric / bridgeless)
Features being used
Frame Processors (worklets)