Problem with AdMob extension and keys


  • Posts: 13
Hello everyone,
I'll move my question here since I feel like it is probably a more pertinent section of the forum.

my problem is that I can't test my game on my device after I enable the AdMob extension.

I made an account on the AdMob website and entered the Publisher Key in Stencyl,
use the "initialize AdMob" block and the ones to show/hide the ad,
but I can't make it work and the log viewer doesn't generate any information,
it only says that my game could not be built.
If I disable the extension the game works just fine though.

Searching in the forum i found that instead of using the "Publisher Key" under the Monetization options, you should use the "Ad Unit ID"
the opposite of what it says on the Stencylpedia.

Which one of the two should I use?

Also is it still possible to use the built in AdMob blocks?

thanks :)


  • *
  • Posts: 524
Hi LeonMane,

What version of Stencyl do you have? What version of the AdMob Extension are you using (2.1 or 3.0)?

If your game fails to compile, please use Debug > Logs > Generate Logs and attach the .zip folder here so that I can take a look at it.

When you use Stencyl, you have two ways to integrate AdMob in your Android games. The first one is using the Stencyl built in blocks and the second one is using the AdMob Extension (version 3.0 or better). If you use the first one you don't have to worry about the second one and vice versa. For example if you decide to use the extension you don' have to worry about the "AdMob Publisher Key" field in settings > mobile > monetization and you can leave it blank.

The Stencyl (3.2) built in blocks for AdMob shares most of the code with the AdMob Extension (3.0), so there shouldn't be any difference if you simply want to show a normal AdMob banner in your games. You have to use the extension if you want to have more control over your banners (normal vs smart banner ads, interstitial/fullscreen ads, change position at runtime, check if it successfully load or if it failed to load, etc ...). So you have to make your choice based on your needs.

The "AdMob Publisher Key" field has a misleading name. You don't have to write your Publisher Key, but your Ad Unit ID. I think that the "Publisher Key" name for that field in the settings was first used when AdWhirl required the AdWhirl Publisher Key. I am 100% sure you have to use your Ad Unit ID, so the Stencylpedia article might have to be updated.
.: BuruBuru :.


  • Posts: 13
Hey Abliblablobla,

first of all thank you for you reply!

I'm using Stencyl 3.1 (7305) and AdMob 3.0
I've attached the .zip file to this reply

Also thank you for the clarification about the built in AdMob blocks,
I  tried this other system instead of the extension and the game builds fine,
but I cannot see the ads while I test it on my device,
is this normal?
is it because I've not uploaded the Apk file on the Android store and therefore didn't connect Admob to my app?

I admit I'm new to programming and I am a lot confused, so forgive me if i said some stupid stuff.

Thanks again!