appandflow / appandflow/react-native-safe-area-context
Crash on Android 14 (S24 Ultra) when setting edges prop on RNCSafeAreaView
- 主要語言
- TypeScript
- 星號
- 2.8k
- 分支
- 258
- 平均合併
- 3 天 1 小時
- 30 天內合併 PR
- 2
描述
### Description
I've encountered a crash in my React Native application on Android when trying to set the `edges` prop on `RNCSafeAreaView`. The application crashes with the following exception:
Exception com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'edges' of a view managed by: RNCSafeAreaView
...
Caused by java.lang.ClassCastException: com.facebook.react.bridge.ReadableNativeMap cannot be cast to com.facebook.react.bridge.ReadableArray
This issue seems to be related to how the `edges` prop is handled in the native Android implementation of `RNCSafeAreaView`.
### Steps to Reproduce
1. Use `SafeAreaView` with the `edges` prop set to an array of strings, e.g., `edges={['top', 'left', 'right']}`.
2. Run the app on an Android device or emulator.
### Expected Behavior
The `SafeAreaView` should correctly apply the safe area insets according to the specified edges without causing a crash.
### Actual Behavior
The application crashes on Android with a `JSApplicationIllegalArgumentException` related to the `edges` prop.
### Environment
- React Native version: 0.73.4
- React Native Safe Area Context version: 4.9.0
- Device: S24 Ultra (I cannot reproduce in my device - S23 Ultra)
### Code Snippet
Here are the snippets from my code where I use `SafeAreaView`:
```jsx
...
```
### Additional Context
I've followed the documentation for react-native-safe-area-context and the usage of SafeAreaView seems to be correct according to the examples provided. This crash is blocking further development and testing on Android devices.
Any assistance or guidance on how to resolve this issue would be greatly appreciated.
貢獻指南
評估
這個 Issue 還沒有評估資料。