未定义不是对象(评估'_react3.default.PropType.shape')

时间:2018-05-07 11:52:44

标签: react-native admob

我对这个问题做了很多研究。我还没有得出结论。我怎么解决这个问题。谢谢。

http://prntscr.com/jesy2n

的package.json

{
  "name": "OlsunBuSefer",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "prop-types": "^15.6.1",
    "react": "16.3.1",
    "react-native": "0.55.3",
    "react-native-admob": "^1.3.2"
  },
  "devDependencies": {
    "babel-jest": "22.4.3",
    "babel-preset-react-native": "4.0.0",
    "jest": "22.4.3",
    "react-test-renderer": "16.3.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

1 个答案:

答案 0 :(得分:0)

您使用react-native-admob的软件包版本似乎从那时起就没有更新过。

PropTypes 已移至React v15.5所提及的单独包中here

您可以查看1.x版本bannerSize: React.PropTypes.string,

中的示例

yarn add react-native-admob@next

解决方法:

您需要使用^2.0.0-beta.5更新软件包才能使用其版本 var credentials = new NetworkCredential(username, password); var serverId = new LdapDirectoryIdentifier("domain.net"); var conn = new LdapConnection(serverId, credentials); conn.Bind();