24小时前创建的AdMob ID在该应用上仍然不可用 [英] AdMob ID created 24hours ago still not available on the app
问题描述
我24小时前创建了一个AdMOb广告单元。测试ID在该应用中可以正常运行,但真正的测试ID仍需要花费大量时间。
I created an AdMOb ad unit 24 hours ago. The test ID works fine in the app but the real one is still taking a lot of time.
这是我在mainactivity上所做的:
Here's what I have done on the mainactivity:
AdView ads;
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
result= (EditText) findViewById(R.id.outputText);
ads = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
ads.loadAd(adRequest);
}
这是我在XML中所做的:
Here's what I did in the XML :
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="31dp"
ads:adSize="BANNER"
ads:adUnitId="id goes here" />
在清单文件中我添加了
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Logcat:
I /广告:开始广告请求。 I / Ads:使用
AdRequest.Builder.addTestDevice( 111938875CFC9AB024C69BABE7ED487C)到
在此设备上获取测试广告
I/Ads: Starting ad request. I/Ads: Use AdRequest.Builder.addTestDevice("111938875CFC9AB024C69BABE7ED487C") to get test ads on this device
我是否需要拥有Google Play开发者帐户才能使用AdMob?
Do I necessarily need to have a Google Play Developer account for AdMob to work ?
推荐答案
如果您的测试广告可以与您的应用正常运行,并且您没有获得实时广告。
If your test Ad working fine with your App and you're not getting live Ads.
执行以下步骤:
-
请等待一段时间。
Wait for some times.
如果您可以加载测试广告,但不能加载实时广告,则听起来好像是您的AdMob帐户有问题。
If you're able to load test ads but not live ads, it sounds like an issue with your AdMob account.
如果仍然遇到问题,则需要等待数小时/小时,然后您需要从AdMob帐户中交叉检查广告单元ID和AppId。
After waiting some times/hours if still having problem then you need to cross check Ad unit Id and AppId from AdMob account.
不,您无需拥有Google Play开发者帐户即可使用AdMob。
No, you don't need to have a Google Play Developer account for AdMob to work.
这篇关于24小时前创建的AdMob ID在该应用上仍然不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!