已经5天了,admob几乎没有在我的应用程序上投放广告,我以前每天获得将近4000个展示,但是现在我每天只有几次展示,
这是我运行应用程序时得到的日志
08-16 17:52:24.597 7713-7713/com.ameerhamza.animatedgiflivewallpapers W/Ads: Not retrying to fetch app settings
08-16 17:52:24.637 7713-7780/com.ameerhamza.animatedgiflivewallpapers W/Ads: Invoke Firebase method getInstance error.
08-16 17:52:24.637 7713-7780/com.ameerhamza.animatedgiflivewallpapers 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
08-16 17:52:24.687 7713-7713/com.ameerhamza.animatedgiflivewallpapers W/Ads: Not retrying to fetch app settings
08-16 17:52:24.727 7713-7713/com.ameerhamza.animatedgiflivewallpapers W/Ads: Not retrying to fetch app settings
08-16 17:52:24.988 7713-7820/com.ameerhamza.animatedgiflivewallpapers W/Ads: Update ad debug logging enablement as false
08-16 17:52:24.988 7713-7776/com.ameerhamza.animatedgiflivewallpapers W/Ads: Update ad debug logging enablement as false
08-16 17:52:25.028 7713-7823/com.ameerhamza.animatedgiflivewallpapers W/Ads: Update ad debug logging enablement as false
08-16 17:52:25.929 27415-5203/? W/Ads: Received error HTTP response code: 403
08-16 17:52:25.929 7713-7727/com.ameerhamza.animatedgiflivewallpapers W/Ads: There was a problem getting an ad response. ErrorCode: 0
08-16 17:52:25.929 7713-7713/com.ameerhamza.animatedgiflivewallpapers W/Ads: Failed to load ad: 0
08-16 17:52:26.029 7713-7780/com.ameerhamza.animatedgiflivewallpapers W/Ads: Fail to instantiate adapter com.google.DummyAdapter
android.os.RemoteException
at com.google.android.gms.internal.ads.zzxm.zzbp(Unknown Source)
at com.google.android.gms.internal.ads.zzxm.zzbo(Unknown Source)
at com.google.android.gms.internal.ads.zzxm.zzbm(Unknown Source)
at com.google.android.gms.internal.ads.zzxo.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.ads.zzek.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:395)
at nb.a(:com.google.android.gms.dynamite_adsdynamite@12874007@12.8.74 (020304-204998136):10)
at com.google.android.gms.ads.internal.mediation.client.d.a(:com.google.android.gms.dynamite_adsdynamite@12874007@12.8.74 (020304-204998136):5)
at com.google.android.gms.ads.internal.reward.a.a(:com.google.android.gms.dynamite_adsdynamite@12874007@12.8.74 (020304-204998136):15)
at com.google.android.gms.ads.internal.reward.mediation.j.a(:com.google.android.gms.dynamite_adsdynamite@12874007@12.8.74 (020304-204998136):27)
at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms.dynamite_adsdynamite@12874007@12.8.74 (020304-204998136):4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
08-16 17:52:26.029 7713-7713/com.ameerhamza.animatedgiflivewallpapers W/Ads: Failed to load ad: 3
08-16 17:52:26.079 7713-7713/com.ameerhamza.animatedgiflivewallpapers W/Ads: Failed to load ad: 3
我的build.gradle
implementation 'com.google.android.gms:play-services-ads:15.0.0'
和
classpath 'com.google.gms:google-services:4.0.0'
这就是我在mainActivty中要求广告的方式
private void showPersonalizedAds() {
ConsentInformation.getInstance(this)
.setConsentStatus(ConsentStatus.PERSONALIZED);
MobileAds.initialize(this, "ca-app-pub-5168564707064012~7233193271");
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-5168564707064012/2661778477");
AdRequest adRequest = new AdRequest.Builder().addTestDevice(DEVICE_ID).build();
mInterstitialAd.loadAd(adRequest);
mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdClosed() {
// Load the next interstitial.
mInterstitialAd.loadAd(new AdRequest.Builder().addTestDevice(DEVICE_ID).build());
}
@Override
public void onAdFailedToLoad(int i) {
super.onAdFailedToLoad(i);
Log.d(TAG, "ad not loaded" + i);
}
});
mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(MainActivity.this);
mRewardedVideoAd.loadAd("ca-app-pub-5168564707064012/4067252078", new AdRequest.Builder().build());
AdView mAdView = findViewById(R.id.adView);
mAdView.loadAd(new AdRequest.Builder().addTestDevice(DEVICE_ID).build());
}