Y
Y
York Princess2018-08-06 18:56:54
Android
York Princess, 2018-08-06 18:56:54

What to do if AdMobs stubbornly does not display ads?

Hello dear.
The problem is this:
The display of ads in the simplest application from one window does not work.
There is nothing on this window except for an ad block:
9hrc-gqa0ayqhswyx_1kyww-kh8.png
The block is full width and height so that there is enough space for 100%, because I read on the Internet that if there is not enough space, it will not display.
The ad unit code is copied from the Google example:
xu03pk6basw22diblfxtrttbo0a.png
In the only activity, everything is also "according to the standard":
ygtxprwttlmdt5teowq3mi5zs_m.png
the application Id is intentionally changed, but it is 100500% correct.
The block id is also correct and matches the id on the AdMobs website. The AdMobs app is linked to FireBase to get the right google-services.json. Yes, it is also present in the project, and the package name is the same everywhere.
The manifest contains permission to use the Internet, this is also a common mistake from the Internet.
bquqdxwkiiseoo-wdy5rgq6ssnm.png
Here are all the dependencies that are installed in this project. The dependencies are taken from the official Google documentation on the implementation of AdMobs in the application:
cs9iwx1f9hfnv1vaybsapnlxpvq.png
And after all this:
xhhezs-d315m26qs4qonhmehjjg.png
No matter how I googled, no matter how perverted, in which files I added any rubbish - AdMobs stubbornly does not want to work.
I've been sitting with this for half a day. It's probably a stupid mistake, as always, but it's all dragged on painfully.
Help please who fumbles in AdMobs for android.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
York Princess, 2018-08-07
@Princess_York

In general, the problem was solved.
The point was that the debug version cannot receive real advertising. To test the correct implementation of AdMob, there are test ad unit ids and a test app id.
They can be found in the corresponding example-projects: https://github.com/googleads/googleads-mobile-andr...
To get real ads, apparently, you need to create a signed apk.
I'm not sure that it was only in release / debug. Most likely, the assistant for adding ads to the application made a decisive contribution.
In the studio, go to Tools / Firebase / , scroll to the bottom of the assistant list, find Admob , click, the tab expands, click Add a banner ad to your app, you will see step-by-step instructions for adding a banner. This is all great, but if everything is already written in your code and the admob application is ready, then just follow the first paragraph of the instruction: Connect your app to Firebase . We poke on the button, log in, and when you have a checkbox labeled Connected , you can start the application. Now everything should definitely work.

D
Dimonchik, 2018-08-06
@dimonchik2013

Well, if
from a test device
, what are you waiting for?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question