AdMob实际广告未展示,仅显示测试广告 [英] AdMob real ads are not showing, only test ads are displayed

查看:364
本文介绍了AdMob实际广告未展示,仅显示测试广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在手机上测试了广告功能.仅显示测试广告.当我用从AdMob获得的单位ID替换单位ID时,不会显示真实的广告.

I have tested the ad feature on my phone. Only the test ad are show. When I replace the unit id with my which I got from AdMob, the real ads are not displayed.

出什么问题了?

这是我的代码:

 <string name="banner_ad_unit_id">ca-app-pub-11*************1/7********5</string>

我使用的xml

  <com.google.android.gms.ads.AdView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            ads:adSize="BANNER"
            android:id="@+id/adView"
            ads:adUnitId="@string/banner_ad_unit_id">
        </com.google.android.gms.ads.AdView>

用于加载我使用的广告

     AdView adView=(AdView)findViewById(R.id.adView);
    AdRequest adRequest= new AdRequest.Builder().setRequestAgent("android_studio:ad_template").build();

    adView.loadAd(adRequest);

我有表现力

    <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

. .

  <activity android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
       android:theme="@android:style/Theme.Translucent"/>

但是我的广告无法在android设备上加载.测试广告运作良好. 我为所有这些操作使用了真实的设备.有什么帮助吗?

But my ads do not load in the android device. Test ads are working fine. I used a real device for all of these operation. Any help please?

推荐答案

据我所知,一切正常.您不一定需要如上所述的庙宇方式.

Okay the things are right as far as I see here. You donot necessarily need that templete way as mention above.

由于您可能刚刚注册了广告,所以广告没有展示.您的广告注册应首先在google服务器上进行验证,并且该服务应被激活并正确进行验证,这样才不会从autoPrograms发出请求.因此,您至少应等待1-2个小时. 问候.

The ads are not showing because you may just have registered for ads. Your ad registeration should first be verified in google servers and that service should be activated and verified properly so that the request is not made from autoPrograms. So you should wait for at least 1-2 hours. Regards.

这篇关于AdMob实际广告未展示,仅显示测试广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆