1
I did everything right: I linked the app with firebase, only when running the ad area turns white. Now, if I use Unit id tests it works normally
Mainactivity code
AdView mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
Layout code
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="368dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id"
tools:layout_editor_absoluteY="8dp"
tools:layout_editor_absoluteX="8dp">
</com.google.android.gms.ads.AdView>
Strings
<resources>
<string name="app_name">My Application</string>
<string name="banner_ad_unit_id">ca-app-pub-
1770401303076452/1027518523</string>
</resources>
You have to wait about a few hours for the ad to appear.
– itscorey
Thank you, I thought I had done something wrong
– Paiva
You added in a Relativelayout?
– viana
Now it appeared normal , except that the admob website clicks counter does not leave the 0
– Paiva
You know that according to the policies the dveloper can not keep clicking on the banners right?! And another, clicks are not computed on the fly, just like the banner is not shown when you create a campaign.
– viana
I was only doing a test to see if everything went well , thanks friend!
– Paiva
What does the log show? When you run the log instructs you to add the device as a test ID in Uilder, so you see a test ad that usually appears faster than the real ad, which will solve your question faster.
– epx
Paiva, did any answer solve your problem? Would there be something else we can explain?
– rbz