AdMob設定のまともなドキュメントがない件

AdMobいれてみようとしたが,機能更新中のドキュメント更新中の模様。
WEBでみかける情報もいまでは古いのでその雰囲気。

XMLでセットする

Google AdMob Ads Android Banner XML
ここをみながら設定する。IDとかサイズ指定などの記述は一切不要だったりする。

表示されたバナーに "Adview missing required XML attribute "adsize"

サイズ指定はなかったはずなのだが。どこかに記入するのか。
調べてみると,ドキュメントが更新されていないらしい。
problem with 4.1.0 - "Adview missing required XML attribute "adsize"

We haven't had a chance to update all of our documentation fully yet. 4.1.0 made some changes to the way that XML layouts work. In particular, you shouldn't need attrs.xml anymore.
Try the following and let me know if it works (or more importantly if
it doesn't):

ライブラリバージョン「4.1.0」ではドキュメントのやり方では動作しないということ。
さらに,以下の設定を加えるそうだ。

1) Remove attrs.xml (or if you need it for your own custom attributes, remove the parts related to AdViews).
2) Change the namespace in your layout
from xmlns:ads="http://schemas.android.com/apk/res/com.your.packagename"
to xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"

attr.xmlは不要で削除。レイアウトのネームスペースの変更を行うといいらしいのだが。
表示されない。ステータスの表示も赤のまま。

W/Ads     ( 6319): Invalid unknown request error: Cannot determine request type. Is your ad unit id correct?
D/webviewglue( 6319): nativeDestroy view: 0x3348a0
I/Ads     ( 6319): onFailedToReceiveAd(Invalid Google Ad request.)

Activityのサイズをpaddingやダイアログテーマなど強制的なサイズ指定をしてるとサイズでおこられる。

W/webcore ( 7750): Can't get the viewWidth after the first layout
I/Ads     ( 7750): onReceiveAd()
W/Ads     ( 7750): Not enough space to show ad! Wants: <480, 75>, Has: <442, 762>

まとめ

情報はいろいろあるのだが,今日現在はカスタムXMLでもいける。
外部ライブラリにビルドパスを通して以下3ファイル。
AndroidManifest.xml

        </activity>
        <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation" />
    </application>
    <uses-permission android:name="android.permission.INTERNET" />    
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  </manifest>

(activity.java)

// Look up the AdView as a resource and load a request.
AdView adView = (AdView)this.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest();
adView.loadAd(adRequest);

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent">

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

ライブラリバージョンは,4.1.0。attr.xmlは不要。