android - undefined 不是在将 native 版本更新为 0.59.4 后评估 (_reactnative.Modal.propTypes.animationType) 的对象

标签 android react-native

我已经将 React native 版本从 0.55 更新到 0.59 并面临一个严重的问题并尝试了所有方法但没有任何效果。它给我的错误是

undefined is not an object evaluating (_reactnative.Modal.propTypes.animationType) 

这是我的 package.json

{
  "name": "Fuelex",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "native-base": "^2.12.1",
    "prop-types": "^15.7.2",
    "react": "16.8.3",
    "react-native": "0.59.4",
    "react-native-checkbox": "^2.0.0",
    "react-native-datepicker": "^1.7.2",
    "react-native-easy-grid": "^0.2.0",
    "react-native-elements": "^0.19.1",
    "react-native-fabric": "^0.5.2",
    "react-native-fbsdk": "^0.8.0",
    "react-native-firebase": "^5.5.4",
    "react-native-flexi-radio-button": "^0.2.2",
    "react-native-geocoder": "^0.5.0",
    "react-native-geocoding": "^0.3.0",
    "react-native-gesture-handler": "^1.3.0",
    "react-native-google-places-autocomplete": "^1.3.9",
    "react-native-google-signin": "^2.0.0",
    "react-native-image-picker": "^0.28.0",
    "react-native-imagepicker": "^2.0.0",
    "react-native-linkedin": "^1.3.1",
    "react-native-linkedin-login": "^1.44.1",
    "react-native-maps": "^0.22.1",
    "react-native-material-dropdown": "^0.11.1",
    "react-native-modal": "^11.3.1",
    "react-native-modal-datetime-picker": "^7.5.0",
    "react-native-paypal-wrapper": "^1.3.2",
    "react-native-simple-time-picker": "^0.2.0",
    "react-native-timeline-listview": "^0.2.3",
    "react-navigation": "^3.11.1",
    "react-timer-mixin": "^0.13.4",
    "rn-fetch-blob": "^0.10.15",
    "rn-viewpager": "^1.2.9",
    "tipsi-twitter": "^2.1.1"
  },
  "devDependencies": {
    "babel-jest": "23.6.0",
    "jest": "23.6.0",
    "metro-react-native-babel-preset": "0.51.1",
    "react-test-renderer": "16.6.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

我已尝试更新包,但没有解决此错误。我还使用 npm 安装了 props-types 包,但它不起作用?帮我解决这个问题。提前致谢!

最佳答案

我已经通过这些步骤解决了..

  1. 删除安装包react-native-material-dropdown

    yarn 移除 react-native-material-dropdown

  2. 安装新包 react-native-material-dropdown-v2react-native-paper

    yarn 添加 react-native-material-dropdown-v2 react-native-paper

  3. 在您的代码中将 react-native-material-dropdown 替换为 react-native-material-dropdown-v2

    例如 import { Dropdown } from 'react-native-material-dropdown'import { Dropdown } from 'react-native-material-dropdown-v2'

关于android - undefined 不是在将 native 版本更新为 0.59.4 后评估 (_reactnative.Modal.propTypes.animationType) 的对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57413508/

相关文章:

android-studio - React-native (Signed) release apk 在设备中不断崩溃

android - 如何让 ADT ArrayAdapter 使用任何布局?当我想添加其他按钮时,它只允许我使用 textView 布局

android - 制作新项目时,如何确保我的 Android 应用程序可以在 3 个不同版本的 Android 上运行?

Android 锁屏通知无法双击打开浏览器

javascript - 如何使用react-native获取父 block 高度?

javascript - 有没有办法停止多次调用一个函数?

javascript - 在React Native中提交后如何调用useEffect中的异步函数?

android - 无法让 setBackgroundMessageHandler 工作

java - 哈希用户密码并检查Android中数据库中的哈希值

android - 添加 Android WiFi 连接结果为 -1