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.
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')
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.