fix: exclude reanimated/worklets native build, disable New Architecture
Release APK / build (push) Has been cancelled
Release APK / build (push) Has been cancelled
react-native.config.js excludes react-native-reanimated and react-native-worklets from Android native linking — neither is used in the app and react-native-gesture-handler has a dedicated noreanimated codepath for exactly this case. build-apk.sh step 4.6 forces newArchEnabled=false in gradle.properties after expo prebuild, as a fallback for New Architecture init issues on Android 15. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -93,6 +93,16 @@ if [ -f "$REANIMATED_CMAKE" ] && ! grep -q "max-page-size" "$REANIMATED_CMAKE";
|
||||
info "Patched react-native-reanimated for 16KB pages"
|
||||
fi
|
||||
|
||||
# ─── 4.6. Disable New Architecture (Android 15 compat) ────────────────────
|
||||
GRADLE_PROPS_NEWARCH="$SCRIPT_DIR/android/gradle.properties"
|
||||
if [ -f "$GRADLE_PROPS_NEWARCH" ]; then
|
||||
sed -i 's/^newArchEnabled=true/newArchEnabled=false/' "$GRADLE_PROPS_NEWARCH"
|
||||
if ! grep -q "^newArchEnabled=" "$GRADLE_PROPS_NEWARCH"; then
|
||||
echo "newArchEnabled=false" >> "$GRADLE_PROPS_NEWARCH"
|
||||
fi
|
||||
info "New Architecture disabled in gradle.properties"
|
||||
fi
|
||||
|
||||
# ─── 5. Patch build.gradle — inject release signingConfig ──────────────────
|
||||
info "Patching android/app/build.gradle for release signing…"
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Exclude native build for packages not used in this project.
|
||||
// react-native-gesture-handler detects their absence and falls back to its
|
||||
// noreanimated codepath, so GestureHandlerRootView continues to work.
|
||||
module.exports = {
|
||||
dependencies: {
|
||||
'react-native-reanimated': {
|
||||
platforms: { android: null },
|
||||
},
|
||||
'react-native-worklets': {
|
||||
platforms: { android: null },
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user