I have a live application on play store which I published a year ago, now on my new machine, I pulled the code & a lot many things were outdated.
I updated all dependencies & moved from Admob to firebase ads as suggested in the documentation.
I'm able to see test ads with firebase ads implementation but not live ads. but live ads are being served on my app which is live.
Please consider below points before checking my code :
- My admob account is not new nor the ads created
- App is already on play store & showing ads with same ads ID
- I've waited 3-4 weeks thinking ads may not be available to serve now
- I'm able to see test ads
Build.gradle has below dependencies
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.google.firebase:firebase-ads:18.1.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
and this too
apply plugin: 'com.google.gms.google-services'
and Manifest.xml has below code for ads
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-XXXXXXXXX~XXXXXXXX"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="12XXXX00" />
MainActivity onCreate method contains
MobileAds.initialize(this, "ca-app-pub-XXXXXXXXX~XXXXXXXX")
finally in my fragment
final AdView mAdView = nestedScrollView.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
and XML of my fragment contains
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/text_margin_mid"
android:layout_marginBottom="@dimen/text_margin_mid"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/ad_banner_ad" />
I'm getting below error in logcat
local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:20290
I/DynamiteModule: Selected remote version of com.google.android.gms.ads.dynamite, version >= 20290
W/Ads: Not retrying to fetch app settings
I/Ads: Ad failed to load : 3