Skip to content

πŸ› [Android] 16KB Page Size Compatibility IssueΒ #2996

@amanchd16

Description

@amanchd16

Description

Summary
The native libraries (librnscreens.so and libreact_codegen_rnscreens.so) in react-native-screens are not compatible with Android's 16KB page size requirement, causing Google Play Store warnings and potential crashes on devices with 16KB page sizes.
Environment

react-native-screens version: 4.11.1
React Native version: 0.80.0
Platform: Android
Architecture affected: armeabi-v7a, x86 (32-bit architectures)
Architecture working: arm64-v8a, x86_64 (64-bit architectures)

Description
Google Play Store now warns about apps that are not compatible with 16KB page sizes. Our analysis shows that react-native-screens native libraries have alignment issues on 32-bit architectures:

❌ Problem architectures:
armeabi-v7a/librnscreens.so - Aligned to 0x4 (4KB)
armeabi-v7a/libreact_codegen_rnscreens.so - Aligned to 0x4 (4KB)
x86/librnscreens.so - Aligned to 0x4 (4KB)
x86/libreact_codegen_rnscreens.so - Aligned to 0x4 (4KB)

βœ… Working architectures:
arm64-v8a/librnscreens.so - Aligned to 0x4000 (16KB)
arm64-v8a/libreact_codegen_rnscreens.so - Aligned to 0x4000 (16KB)
x86_64/librnscreens.so - Aligned to 0x4000 (16KB)
x86_64/libreact_codegen_rnscreens.so - Aligned to 0x4000 (16KB)

Steps to reproduce

Reproducer: RNTesterPlayground.js is not applicable for this issue.

This is a native library build configuration issue, not a JavaScript runtime issue. The problem exists in how React Native's native libraries (.so files) are compiled and linked by the NDK build system.

To reproduce the actual issue:

  1. Build any React Native Android app
  2. Extract the APK: unzip app-release.apk -d extracted/
  3. Analyze native libraries: objdump -x extracted/lib/armeabi-v7a/libreactnative.so | grep Align
  4. Observe 4KB alignment (0x4) instead of required 16KB alignment (0x4000)

JavaScript code cannot reproduce this because it's a compilation/linking issue that affects the ELF binary format of native libraries, not runtime behavior.

Snack or a link to a repository

https://developer.android.com/guide/practices/page-sizes

Screens version

4.11.1

React Native version

0.80.0

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Missing reproThis issue need minimum repro scenarioPlatform: AndroidThis issue is specific to Android

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions