๐ Google Compliance Warning: 16KB Page Size Requirement (Android 15+) with react-native-vision-camera 4.6.4
What's happening?
Weโve recently started receiving compliance warnings from Google Play regarding the 16KB page size requirement (Android 15+), which specifically points to Vision Camera. Weโre currently using react-native-vision-camera version 4.6.4. I wanted to check if thereโs a specific version available that addresses this issue, or if itโs still under investigation, and if thereโs any recommended way to resolve it?
Reproduceable Code
Google Compliance Warning, So no code added
Relevant log output
Google Compliance Warning, So no code added
Camera Device
Google Compliance Warning, So no code added
Device
Android
VisionCamera Version
4.6.4
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (โ ๏ธ your issue might get ignored & closed if you don't try this)
Additional information
- [ ] I am using Expo
- [ ] I have enabled Frame Processors (react-native-worklets-core)
- [x] I have read the Troubleshooting Guide
- [x] I agree to follow this project's Code of Conduct
- [x] I searched for similar issues in this repository and found none.
Guten Tag, Hans here.
[!NOTE] New features, bugfixes, updates and other improvements are all handled mostly by
@mrousavyin his free time. To support@mrousavy, please consider ๐ sponsoring him on GitHub ๐. Sponsored issues will be prioritized.
4.7.0 added 16kb page support
4.7.0 added 16kb page support
Okay @jslok , so if we bump the version from 4.6.4 to 4.7.2, that should resolve it, right?
4.7.0 added 16kb page support
Okay @jslok , so if we bump the version from 4.6.4 to 4.7.2, that should resolve it, right?
Try it and let us know :)
upgrade to 4.7.2 but its still showing not supported 16kb "react-native-vision-camera": "^4.7.2",
mmPsTqUeUG/lib/arm64-v8a/libVisionCamera.so: \e[31mUNALIGNED\e[0m (2**12)
upgrade to 4.7.2 but its still showing not supported 16kb "react-native-vision-camera": "^4.7.2",
mmPsTqUeUG/lib/arm64-v8a/libVisionCamera.so: \e[31mUNALIGNED\e[0m (2**12)
I also get the same issue
It works for me. Make sure you clean all cache and .gradle folders
It works for me. Make sure you clean all cache and .gradle folders
Which ndk version are you using?
It works for me. Make sure you clean all cache and .gradle folders
Which ndk version are you using?
ndkVersion = "26.1.10909125"
It works for me. Make sure you clean all cache and .gradle folders
Which ndk version are you using?
ndkVersion = "26.1.10909125"
Pretty sure you need rn >=0.77 and ndk 27.
Let me also share here what worked for me:
"react-native": "0.79.3", "react-native-worklets-core": "^1.3.3", <-- ADD "react-native-vision-camera": "4.7.1",
android/build.gradle ndkVersion = "27.1.12297006"
@MariaFF NDK version 27 doesn't support 16KB page size for android.. so we cannot downgrade the NDK version..
thanks it works for me ndkVersion = "27.1.12297006" "react-native-vision-camera": "^4.7.2", "react": "19.0.0", "react-native": "0.79.2",
NDK 28+ crashes apps right on startup, while 27 works fine with the flag for flexible page size.
Thank you, It worked for me on Emulators. Has anyone tried on a Physical device which have a 16 KB page size? ndkVersion = "27.1.12297006" "react-native-vision-camera": "^4.7.2", "react": "19.0.0", "react-native": "0.79.2",
@Jigisha820 It seems they don't exist yet ๐ . That's why they're making us update the apps.
It works for me. Make sure you clean all cache and .gradle folders
@Jigisha820 It seems they don't exist yet ๐ . That's why they're making us update the apps.
@Acex187x True, however, this option is available on Pixel 8 and Pixel 8 Pro starting in the Android 15 QPR1 Beta. We can switch from the default size to 16KB
I'm getting the following error when starting my Android app after upgrading the NDK version. This crash occurs immediately when the app starts.
Failed to load VisionCamera C++ library! java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__cxa_init_primary_exception" referenced by "/data/app/~ somepath /base.apk!/lib/arm64-v8a/libVisionCamera.so"
minSdkVersion = 27
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "28.2.13676358"
kotlinVersion = "1.9.25"
"react": "18.3.1",
"react-native": "0.76.9",
"react-native-vision-camera": "4.7.1",
The issue did not occur with the previous setup (NDK 26.1.10909125 and react-native-vision-camera ^4.3.1).
Also, I added the following code when I was on ndk v28 but it did not work.
set_target_properties(${PACKAGE_NAME} PROPERTIES
LINK_FLAGS "-Wl,-z,max-page-size=16384"
)
and didn't work > rezagaruda:fix/android-16kb-page-size-support