React-native-admob: Invariant Violation: Native component for "RNGADBannerView" does not exist

Created on 21 Dec 2017  路  7Comments  路  Source: sbugert/react-native-admob

Followed the following steps:

  1. create-react-native-app
  2. cd
  3. yarn add react-native-admob@next
  4. copied the same code as provided in Example folder.
  5. Getting following error:
    Invariant Violation: Native component for "RNGADBannerView" does not exist

Tried the same process with

  1. react-native init
  2. cd
  3. npm install react-native-admob@next --save
  4. copied the same code as provided in Example folder.
  5. Getting following error:
    Invariant Violation: Native component for "RNGADBannerView" does not exist

Most helpful comment

This continued happening to me on Android after react-native link. It turned out that the linking process hadn't added the package into my MainApplication.java like so:

import com.sbugert.rnadmob.RNAdMobPackage;
new RNAdMobPackage()

All 7 comments

I had the same problem. It happens because there is a mistake on linking. My closed issue is below.
https://github.com/sbugert/react-native-admob/issues/230

verified it. after "react-native link" it worked.

This continued happening to me on Android after react-native link. It turned out that the linking process hadn't added the package into my MainApplication.java like so:

import com.sbugert.rnadmob.RNAdMobPackage;
new RNAdMobPackage()

I also face the same issue. I share a link, this issue mention here with the solution. It might be helpful to you.
Pls refer this link:
https://react-native-solutions.blogspot.com/2018/07/how-to-create-react-native-app-with.html

I solved my problem with re-install the component npm install react-native-admob@next --save and react-native link and re-compile the project.

finally did you use the project by npm run eject?

still having this issue after linking and upgrading to latest version. Linking is not working.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shinriyo picture shinriyo  路  3Comments

brkrtp picture brkrtp  路  3Comments

xencodes picture xencodes  路  4Comments

kanekotic picture kanekotic  路  6Comments

aligenc picture aligenc  路  3Comments