2

I am trying to implement AdMob banner ads. Test ID is working fine. But for my Ad ID its showing the error posting under logcat.

MAINACTIVITY

MobileAds.initialize(this, "MY_APP_ID");
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);

XML

<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_alignParentBottom="true"
    ads:adSize="SMART_BANNER"
    ads:adUnitId="MY_AD_ID" />

MANIFEST

<meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="MY_APP_ID"/>

PROJECT.GRADLE

 repositories {
    google()
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}

APP.GRADLE

implementation 'com.google.android.gms:play-services-ads:15.0.1'

LOGCAT

10-10 15:47:21.430 29883-30587/? E/Ads: Error waiting for future. java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException at com.google.android.gms.ads.internal.util.future.af.get(:com.google.android.gms@14366007@14.3.66 (020304-213742215):18) at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms@14366007@14.3.66 (020304-213742215):11) at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@14366007@14.3.66 (020304-213742215):36) at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@14366007@14.3.66 (020304-213742215):169) at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms@14366007@14.3.66 (020304-213742215):1) 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) Caused by: java.util.concurrent.TimeoutException at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) 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)  10-10 15:47:22.280 13964-13979/com.ashleytobeybuttons.whosyourdaddyboy I/Ads: No fill from ad server. 10-10 15:47:22.300 13964-13964/com.ashleytobeybuttons.whosyourdaddyboy W/Ads: Failed to load ad: 3

Markus Kauppinen
  • 3,025
  • 4
  • 20
  • 30
Syed Arsalan Kazmi
  • 949
  • 1
  • 11
  • 17

0 Answers0