Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] android – Admob Interstitial ad showing Error building request URL

Posted on November 14, 2022

Solution 1 :

Make sure you use the correct test ad ID from AdMob in the call InterstitialAd. This is not the same as your App ID, it has an attached slash and a number behind it.

For testing,
use ca-app-pub-3940256099942544/1033173712 which is the test ID given by the docs at the time of writing.

Solution 2 :

I’ve noticed that this error occurs in these cases:

  • When you type wrong adUnitId.
  • When you pass wrong AdSize (ex. too big or too small).
  • When Google stops displaying ads in your app, because you break some admob rules.

Solution 3 :

I had a similar problem, after checking I found out that I entered the unit ID incorrectly.

Solution 4 :

For instersticial Ad the Sample ad unit ID must be: ca-app-pub-3940256099942544/1033173712

Here is the demo ad units that point to specific test creatives for each format.

enter image description here

Solution 5 :

Never use App id from the console to Test ads in your app. Instead use these sample id’s:

Ad format Sample Ad Unit Id How it looks
App Open ca-app-pub-3940256099942544/3419835294
Banner ca-app-pub-3940256099942544/6300978111
Interstitial ca-app-pub-3940256099942544/1033173712 No preview
Interstitial Video ca-app-pub-3940256099942544/8691691433

And a lot more. You can find all of them here

Problem :

I have implemented admob interstitial ad recently and getting exception/error as Error building request URL. from method onAdFailedToLoad(), and also my ad is not shown
.

My code:

InterstitialAd interstitialAd;
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
        
                InterstitialAd interstitialAd = new InterstitialAd(MainActivity.this);
                interstitialAd.setAdUnitId(KEY);
                MobileAds.initialize(MainActivity.this, new OnInitializationCompleteListener() {
                    @Override
                    public void onInitializationComplete(InitializationStatus initializationStatus) {
                        Log.e("app","MobileAds onInitializationComplete");
                    }
                });
                interstitialAd.loadAd(new AdRequest.Builder().build());
                interstitialAd.setAdListener(new AdListener(){
                    @Override
                    public void onAdLoaded() {
                        Log.e("app","ad loaded");
                    }
        
                    @Override
                    public void onAdFailedToLoad(LoadAdError loadAdError) {
                        Log.e("app","ad failedToLoad: "+loadAdError.getMessage()); //error/exception here
                    }
                });
}
                  protected void onActivityResult(int requestCode, int resultCode, Intent data) {

        super.onActivityResult(requestCode, resultCode, data);
        if(interstitialAd.isLoaded()) {
                    interstitialAd.show();
                    Log.e("app","ad loaded");
                }
                else Log.e("app","ad not loaded yet");              
    }
}

I have registered my id properly in the Manifest.xml

<application>
<meta-data
            android_name="com.google.android.gms.ads.APPLICATION_ID"
            android_value="@string/KEY"/>
    </application>

Followed same guideline shown in here

READ  [ANSWERED] java - Getiing android.database.CursorWindowAllocationException frequently crash
Powered by Inline Related Posts

Comments

Comment posted by Abhay Koradiya

use testing id for test.

Comment posted by Bugzilla

If you load => fail => try load again => fail => try load again you may hit the API rate limit that triggers the 3 – Error building request url. I think the limit is 3 request every 10 seconds.

Comment posted by Wouter Vandenputte

I have been having this problem for hours and it indeed seemed that I was having an issue with my adsize. Thanks!!!

Comment posted by Sambhav Khandelwal

It would be better if you add the link to docs and also write this in the form of text

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress