Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
liuyunzyj opened this issue Feb 28, 2024 · 7 comments
Labels

Comments

@liuyunzyj
Copy link

💬 前提强调

  • I have searched the issues of this repository and believe that this is not a duplicate.

🙋 描述详情/重现步骤

版本:
"@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:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.20.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.7
wanted: 0.72.7
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

补充说明

No response

@1uokun
Copy link
Collaborator

1uokun commented Feb 28, 2024

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

检查一下以下几点:

  • App.js有没有加 import 'react-native-gesture-handler';
  • 有没有移除@react-native-picker/picker

@liuyunzyj
Copy link
Author

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

@liuyunzyj
Copy link
Author

liuyunzyj commented Feb 29, 2024

真机错误截图如下:
image
image

@liuyunzyj
Copy link
Author

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

@surya-inbasagaran
Copy link

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
Copy link

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

@1uokun 1uokun mentioned this issue Mar 15, 2024
1 task
@1uokun
Copy link
Collaborator

1uokun commented Mar 18, 2024

fixed in v5.1.1

@1uokun 1uokun closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants