React-native-admob: undefined is not an object (evaluating '_react3.default.PropTypes.string')

Created on 13 Feb 2018  路  6Comments  路  Source: sbugert/react-native-admob

I've the error "undefined is not an object (evaluating '_react3.default.PropTypes.string')" when I add the "import { AdMobBanner } from 'react-native-admob';" line in my project.

Most helpful comment

You're probably using the 1.x version, which doesn't support the latest versions of React Native. To use this library with the latest version of React Native you should use the 2.0.0-beta version.

All 6 comments

same problem

You're probably using the 1.x version, which doesn't support the latest versions of React Native. To use this library with the latest version of React Native you should use the 2.0.0-beta version.

you have to install beta version 2.0.0
npm i --save react-native-admob@next
it successfully works for me

really?
it happened
node_modules/react-native-admob/RNAdMobBanner.js 63:30

AdMobBanner.simulatorId = 'SIMULATOR';
// this is line 63
AdMobBanner.propTypes = {
  ...ViewPropTypes,

I just reload [control + R] and the error resolved.

I had the same problem and upgraded to version 2. The original error has gone away but the error I get now is this:

TypeError: undefined is not an object (evaluating '_reactNative.UIManager.RNGADBannerView.Constants')

Was this page helpful?
0 / 5 - 0 ratings

Related issues

furkancelik picture furkancelik  路  5Comments

aligenc picture aligenc  路  3Comments

shinriyo picture shinriyo  路  3Comments

vu-dang picture vu-dang  路  5Comments

MohsinTariq10 picture MohsinTariq10  路  6Comments