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] Carousel - java.lang.Boolean cannot be cast to java.lang.Double Bug🐛 #1329

Closed 1291862631 closed 3 months ago

1291862631 commented 3 months ago

💬 Before You Start

🙋 Description/Step to reproduce

"@ant-design/react-native": "^5.1.0", "react-native-gesture-handler": "^2.14.0", 问题1: 源码 image 报错信息 Invariant Violation: requireNativeComponent: "GestureHandlerRootView" was not found in the UIManager. 我在App.tsx 中添加了

image

问题2: 源码 image

错误信息: 656312c432d7695e993e2fa96711c22

package.json

{
  "name": "wisdomapp_customization",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest",
    "bundle-ios": "node node_modules/react-native/local-cli/cli.js bundle --entry-file index.js --platform ios --dev false --bundle-output ./ios/bundle/index.jsbundle --assets-dest ./ios/bundle"
  },
  "dependencies": {
    "@ant-design/react-native": "^5.1.0",
    "@fanchenbao/react-native-scroll-indicator": "^0.2.2",
    "@react-native-async-storage/async-storage": "^1.19.4",
    "@react-native-community/segmented-control": "^2.2.2",
    "@react-native-community/slider": "^4.5.0",
    "@react-navigation/bottom-tabs": "^6.5.11",
    "@react-navigation/material-top-tabs": "^6.6.5",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/stack": "^6.3.19",
    "@sdcx/nested-scroll": "^0.11.0",
    "@sdcx/pull-to-refresh": "^0.21.0",
    "axios": "^1.5.1",
    "babel-plugin-module-resolver": "^5.0.0",
    "base-64": "^1.0.0",
    "core-js": "^3.33.2",
    "i18next": "^23.6.0",
    "iconv-lite": "^0.6.3",
    "install": "^0.13.0",
    "lottie-ios": "^4.4.1",
    "lottie-react-native": "^6.4.0",
    "md5": "^2.3.0",
    "npm": "^10.2.2",
    "react": "18.2.0",
    "react-i18next": "^13.3.1",
    "react-native": "0.72.6",
    "react-native-animatable": "^1.4.0",
    "react-native-ble-manager": "^10.1.5",
    "react-native-camera": "^4.2.1",
    "react-native-circular-progress": "^1.3.9",
    "react-native-device-info": "^10.11.0",
    "react-native-draggable-switch": "^1.1.1",
    "react-native-gesture-handler": "^2.14.0",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-localize": "^3.0.3",
    "react-native-modal": "^13.0.1",
    "react-native-pager-view": "^6.2.2",
    "react-native-permissions": "^4.1.4",
    "react-native-picky-wheel": "^0.4.2",
    "react-native-qrcode-scanner-rn07": "^1.5.5",
    "react-native-reanimated": "^3.5.4",
    "react-native-safe-area-context": "^4.7.3",
    "react-native-screens": "^3.26.0",
    "react-native-shadow-2": "^7.0.8",
    "react-native-simple-toast": "^3.2.0",
    "react-native-smooth-slider": "^1.3.9",
    "react-native-svg": "^13.14.0",
    "react-native-tab-view": "^3.5.2",
    "react-native-webview": "^13.6.2",
    "react-native-wifi-reborn": "^4.11.0",
    "sp-react-native-mqtt": "github:koten551/sp-react-native-mqtt",
    "three": "^0.160.0",
    "url": "^0.11.3"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/eslint-config": "^0.72.2",
    "@react-native/metro-config": "^0.72.11",
    "@tsconfig/react-native": "^3.0.0",
    "@types/base-64": "^1.0.2",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "@types/three": "^0.160.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.76.8",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "engines": {
    "node": ">=16"
  }
}

💻 Environment

Android

⚫️ Output of npx react-native info

OS: Windows 11 10.0.22621 CPU: (20) x64 Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz Memory: 32.50 GB / 47.84 GB Binaries: Node: version: 18.17.0 path: D:\nodejs\node.EXE Yarn: version: 1.22.19 path: D:\nodejs\node_global\yarn.CMD npm: version: 10.5.0 path: D:\ReactNativeProject\wisdomapp_customization\node_modules.bin\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels:

Additional comments

No response

1291862631 commented 3 months ago

尝试对@ant-design/react-native 版本进行降级,解决了我的问题 将"@ant-design/react-native": "^5.0.4", 修改为"@ant-design/react-native": "5.0.4",该问题就没有了,对"react-native-gesture-handler": "^2.14.0", 进行降级没有作用,如果需要使用ant-design 5.1.0 的新特性,降级后能正常使用了在进行升级。这是我解决该问题的方法

1uokun commented 3 months ago

fixed in v5.1.1