React native 此错误是什么?未定义的对象不是对象(计算';react2.PropType.number';)?

React native 此错误是什么?未定义的对象不是对象(计算';react2.PropType.number';)?,react-native,React Native,在android emulator上运行react本机程序时,我遇到了这个错误。这里是什么?我已经尝试过很多事情,比如在android项目文件夹中添加依赖项,这是我的package.json的一些代码片段 "dependencies": { "react": "16.0.0", "react-native": "0.50.2", "react-native-button": "^2.1.0", "react-native-router-flux": "^4.0.0

在android emulator上运行react本机程序时,我遇到了这个错误。这里是什么?我已经尝试过很多事情,比如在android项目文件夹中添加依赖项,这是我的package.json的一些代码片段

"dependencies": {
    "react": "16.0.0",
    "react-native": "0.50.2",
    "react-native-button": "^2.1.0",
    "react-native-router-flux": "^4.0.0-beta.22"
},

添加道具类型库依赖项

 "dependencies": {
     "prop-types": "^15.5.7" 
 }
或者只是用npm安装它

npm install --save prop-types

不工作。。两种选择都试过了,谢谢你的回答+1@fazeelreact在版本15.5之后,您必须导入道具类型,因此请检查您使用道具类型的文件中是否有“从“道具类型”导入道具类型”