react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

๐Ÿ› Google Compliance Warning: 16KB Page Size Requirement (Android 15+) with react-native-vision-camera 4.6.4

Open sindhusingh opened this issue 3 months ago โ€ข 19 comments

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?

Image

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

sindhusingh avatar Sep 18 '25 18:09 sindhusingh

Guten Tag, Hans here.

[!NOTE] New features, bugfixes, updates and other improvements are all handled mostly by @mrousavy in his free time. To support @mrousavy, please consider ๐Ÿ’– sponsoring him on GitHub ๐Ÿ’–. Sponsored issues will be prioritized.

maintenance-hans[bot] avatar Sep 18 '25 18:09 maintenance-hans[bot]

4.7.0 added 16kb page support

jslok avatar Sep 19 '25 06:09 jslok

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?

sindhusingh avatar Sep 19 '25 09:09 sindhusingh

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 :)

jslok avatar Sep 21 '25 00:09 jslok

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)

alikemalozgumus avatar Sep 23 '25 08:09 alikemalozgumus

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

rezagaruda avatar Sep 23 '25 10:09 rezagaruda

It works for me. Make sure you clean all cache and .gradle folders

jslok avatar Sep 23 '25 10:09 jslok

It works for me. Make sure you clean all cache and .gradle folders

Which ndk version are you using?

rezagaruda avatar Sep 23 '25 10:09 rezagaruda

It works for me. Make sure you clean all cache and .gradle folders

Which ndk version are you using?

ndkVersion = "26.1.10909125"

alikemalozgumus avatar Sep 23 '25 10:09 alikemalozgumus

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.

jslok avatar Sep 23 '25 19:09 jslok

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 avatar Sep 25 '25 12:09 MariaFF

@MariaFF NDK version 27 doesn't support 16KB page size for android.. so we cannot downgrade the NDK version..

michalis-ligopsychakis avatar Sep 30 '25 08:09 michalis-ligopsychakis

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",

alikemalozgumus avatar Oct 02 '25 07:10 alikemalozgumus

NDK 28+ crashes apps right on startup, while 27 works fine with the flag for flexible page size.

Acex187x avatar Oct 17 '25 12:10 Acex187x

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 avatar Oct 17 '25 15:10 Jigisha820

@Jigisha820 It seems they don't exist yet ๐Ÿ˜…. That's why they're making us update the apps.

Acex187x avatar Oct 17 '25 15:10 Acex187x

It works for me. Make sure you clean all cache and .gradle folders

jslok avatar Oct 17 '25 15:10 jslok

@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

Jigisha820 avatar Oct 17 '25 15:10 Jigisha820

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

MuazzezA avatar Oct 27 '25 07:10 MuazzezA