Summary
Apps using react-native-screens crash on Android 15+ devices with 16KB page size configurations. This patch fixes that by updating the CMake build configuration.
Background
Android 15 introduced support for 16KB memory page sizes. Apps must explicitly support this to run on affected devices and meet Google Play Store requirements.
Changes
node_modules/react-native-screens/android/build.gradle
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared",
- "-DRNS_NEW_ARCH_ENABLED=${IS_NEW_ARCHITECTURE_ENABLED}"
+ "-DRNS_NEW_ARCH_ENABLED=${IS_NEW_ARCHITECTURE_ENABLED}",
+ "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
}
}
Environment
- react-native: 0.78.0
- react-native-screens: 3.37.0
- Android NDK: 27.1.12297006
- New Architecture: enabled
- Target SDK: 35
Impact
Without patch: crashes on Android 15+ 16KB page size devices.
With patch: compatible with both 4KB and 16KB page size devices.
Testing
Verified on Android 15 emulator (16KB page size) and standard 4KB devices, debug and release, all architectures.
References
Summary
Apps using
react-native-screenscrash on Android 15+ devices with 16KB page size configurations. This patch fixes that by updating the CMake build configuration.Background
Android 15 introduced support for 16KB memory page sizes. Apps must explicitly support this to run on affected devices and meet Google Play Store requirements.
Changes
node_modules/react-native-screens/android/build.gradle
Environment
Impact
Without patch: crashes on Android 15+ 16KB page size devices.
With patch: compatible with both 4KB and 16KB page size devices.
Testing
Verified on Android 15 emulator (16KB page size) and standard 4KB devices, debug and release, all architectures.
References