fix: patch worklets and reanimated for Android 15 16KB page size support
Release APK / build (push) Has been cancelled
Release APK / build (push) Has been cancelled
react-native-worklets and react-native-reanimated compile .so files without -Wl,-z,max-page-size=16384, causing a native crash at startup on Android 15 devices that use 16KB memory pages (Pixel 9+, Galaxy S25+). Patch applied in build-apk.sh and CI workflow after npm install, before the Gradle build. Guard prevents double-patching on repeated runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,17 @@ jobs:
|
||||
[ -n "$KEYSTORE_STORE_PASSWORD" ] && echo "KEYSTORE_STORE_PASSWORD: set" || echo "KEYSTORE_STORE_PASSWORD: EMPTY"
|
||||
[ -n "$KEYSTORE_KEY_PASSWORD" ] && echo "KEYSTORE_KEY_PASSWORD: set" || echo "KEYSTORE_KEY_PASSWORD: EMPTY"
|
||||
|
||||
- name: Patch native modules for Android 15 16KB page size
|
||||
run: |
|
||||
WORKLETS="node_modules/react-native-worklets/android/CMakeLists.txt"
|
||||
REANIMATED="node_modules/react-native-reanimated/android/CMakeLists.txt"
|
||||
if [ -f "$WORKLETS" ] && ! grep -q "max-page-size" "$WORKLETS"; then
|
||||
printf '\ntarget_link_options(worklets PRIVATE "-Wl,-z,max-page-size=16384")\n' >> "$WORKLETS"
|
||||
fi
|
||||
if [ -f "$REANIMATED" ] && ! grep -q "max-page-size" "$REANIMATED"; then
|
||||
printf '\ntarget_link_options(reanimated PRIVATE "-Wl,-z,max-page-size=16384")\n' >> "$REANIMATED"
|
||||
fi
|
||||
|
||||
- name: Build signed APK
|
||||
run: ./build-apk.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user