ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3k stars 610 forks source link

[Bug] DatePickerView 日期选择器安卓环境报错java.lang.Boolean cannot be cast to java.lang.Double #1327

Closed liuyunzyj closed 3 months ago

liuyunzyj commented 4 months ago

💬 前提强调

🙋 描述详情/重现步骤

版本: "@ant-design/icons-react-native": "^2.3.2", "@ant-design/react-native": "^5.1.0", 使用 DatePickerView 日期选择器安卓环境直接报错。 image image

💻 运行环境

Android

⚫️ npx react-native info输出信息

System: OS: macOS 14.0 CPU: (8) arm64 Apple M1 Memory: 69.45 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.18.0 path: /usr/local/bin/node Yarn: version: 1.22.21 path: /usr/local/bin/yarn npm: version: 9.8.1 path: /usr/local/bin/npm Watchman: version: 2023.11.13.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms:

补充说明

No response

1uokun commented 4 months ago

Picker改成纯js实现了,你这个native层报错和截图的代码应该无关。

检查一下以下几点:

liuyunzyj commented 4 months ago

我把这部分代码去掉就不报错了。 image app.js 加了如下图: image 有没有移除@react-native-picker/picker:去掉了,如下图: image

liuyunzyj commented 4 months ago

真机错误截图如下: image image

liuyunzyj commented 4 months ago

大致找到原因了:"react-native-gesture-handler": "^2.15.0",会产生上述问题。降级到"react-native-gesture-handler": "^2.14.0"即可。具体问题需要查看react-native-gesture-handler库

surya-inbasagaran commented 4 months ago

but I haven't used "react-native-gesture-handler" package in my project. Is it mandatory to have that package for ant-design package to work ?

1291862631 commented 3 months ago

相同的问题将react-native-gesture-handler降级到2.14.0 还是会报相同的错误

1uokun commented 3 months ago

fixed in v5.1.1