Android 请求时未显示admob广告。设置测试(错误)

Android 请求时未显示admob广告。设置测试(错误),android,Android,当我放置我的酒吧id时 AdView adView = new AdView(this, AdSize.BANNER, Publisher ID); 及 我没有收到如何解决这个问题的广告。。实际问题是什么;lem?在XML中添加横幅会更容易 <com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap

当我放置我的酒吧id时

 AdView adView = new AdView(this, AdSize.BANNER, Publisher ID);


我没有收到如何解决这个问题的广告。。实际问题是什么;lem?

在XML中添加横幅会更容易

       <com.google.ads.AdView
  android:id="@+id/adView"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  ads:adSize="BANNER"
  ads:adUnitId="xxxxxxxxxxx"
  ads:loadAdOnCreate="true"


  ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" />

在XML中添加横幅会更容易

       <com.google.ads.AdView
  android:id="@+id/adView"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  ads:adSize="BANNER"
  ads:adUnitId="xxxxxxxxxxx"
  ads:loadAdOnCreate="true"


  ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" />

在活动中使用此选项:

adview = (AdView) findViewById(R.id.adView);
AdRequest re = new AdRequest();
re.addTestDevice(AdRequest.TEST_EMULATOR); // Emulator
re.addTestDevice("xxxxxxxxxxx"); // Test Android Device
adview.loadAd(re);
在XML文件中使用此选项:

<com.google.ads.AdView
        android:id="@+id/adView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
        ads:adSize="BANNER"
        ads:adUnitId="xxxxxxxxxx"
        ads:loadAdOnCreate="true">
</com.google.ads.AdView>

在活动中使用此选项:

adview = (AdView) findViewById(R.id.adView);
AdRequest re = new AdRequest();
re.addTestDevice(AdRequest.TEST_EMULATOR); // Emulator
re.addTestDevice("xxxxxxxxxxx"); // Test Android Device
adview.loadAd(re);
在XML文件中使用此选项:

<com.google.ads.AdView
        android:id="@+id/adView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
        ads:adSize="BANNER"
        ads:adUnitId="xxxxxxxxxx"
        ads:loadAdOnCreate="true">
</com.google.ads.AdView>


嘿,史密斯。。事实上,我已经找到了解决方案。需要1-2天才能得到广告。还要检查你的admob设置Shey smith。。事实上,我已经找到了解决方案。它需要1-2天的时间来获取广告…同时还要检查你的admob设置