sbugert / react-native-admob

A react-native component for Google AdMob banners
BSD 2-Clause "Simplified" License
1.13k stars 532 forks source link

Ads not loading #367

Open syedabdulbaqi opened 5 years ago

syedabdulbaqi commented 5 years ago

Issue:

Admob test ad units are not loading. Recceiving the following warning message in android studio, not sure if this is the main reason. Also I am not sure if I am using the correct settings for AndroidManifest.xml, can someone please confirm?

Environment:

"react": "16.5.0",
"react-native": "^0.57.1",
"react-native-admob": "^2.0.0-beta.5",

AndroidManifest.xml

  <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-3940256099942544~3347511713"/>

build.gradle

classpath 'com.android.tools.build:gradle:3.1.4'

distributionUrl

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Warning Message:

2018-10-08 09:54:33.467 5240-5281/com.MyApp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.sbugert.rnadmob.RNAdMobBannerViewManager 2018-10-08 09:54:33.470 5240-5281/com.MyApp W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.sbugert.rnadmob.RNPublisherBannerViewManager 2018-10-08 09:54:36.350 5240-5326/com.MyApp W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date

Crazy-Ivan commented 5 years ago

@syedabdulbaqi I have the same issue. Did you find the reason?

syedabdulbaqi commented 5 years ago

@Crazy-Ivan I was facing this issue after updating react-native-admob library to latest version. You will have to update your AdMobBanner tag. Replace bannerSize with adSize. The value of the attribute must also be set properly.

Before: <AdMobBanner bannerSize="leaderboard" adUnitID="ca-app-pub-12341234/1234" testDeviceID="EMULATOR" />

After: <AdMobBanner adSize="banner" adUnitID="ca-app-pub-12341234/1234" testDeviceID="EMULATOR" />

SaGaR1084 commented 5 years ago
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-admob": "^2.0.0-beta.5",