callstack / callstack/react-native-slider

Error when putting children inside `<Slider/>` component

未关闭
#512 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug report platform: Android
主要语言
TypeScript
星标
1.4k
派生
295
平均合并
5 分钟
30 天内合并 PR
1

描述

## Environment
Expo version: 0.7.1
Android Emulator: Pixel_XL_API_30

* react-native info output:
```
// react-native info
```

* are you using the new architecture?
yes
* which version of react & react-native are you using?
"react": "18.2.0",
"react-native": "0.71.8",

## Description
When running my project in the emulator this error happens: abi48_0_0.com.reactnativecommunity.slider.ReactSlider cannot be cast to android.view.ViewGroup
When running it on a physical iPhone device it just work.

![Screenshot 2023-05-25 at 9 36 22 PM](https://github.com/callstack/react-native-slider/assets/75346996/52b62c86-59bc-4fba-a21c-2dc745196ccc)
![Screenshot 2023-05-25 at 9 37 36 PM](https://github.com/callstack/react-native-slider/assets/75346996/8227fc59-fb71-41d4-85fe-d084a8f58e24)

## Reproducible Demo
`
{`${playBackTime.hour}:${playBackTime.min}:${playBackTime.sec}``

贡献指南

打开贡献指南

调研方向

先在 Android 模拟器上复现所提供的 Slider-with-Text 示例,然后追踪 Slider 如何处理 children,以及 ReactSlider view 在哪里被当作 ViewGroup 处理。完成的标准是示例能够在 Android 上运行且不会出现 cast 错误,同时保留现有的 iPhone 行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native, typescript
领域
mobile
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。