奇怪的admob问题

| 我今天对应用程序进行了一些更新,但现在admob无法正常工作,这使我在广告中出现了错误“ 0”。现在我所做的更改与广告无关,自从我实施并投入使用以来,它们就一直是相同的 这是我的XML
<LinearLayout
xmlns:android=\"http://schemas.android.com/apk/res/android\"
xmlns:ads=\"http://schemas.android.com/apk/res/com.notify.me.lite\"
android:layout_width=\"fill_parent\"
android:id=\"@+id/mainLayout1\"
android:layout_height=\"fill_parent\" android:orientation=\"vertical\"> 
            <com.google.ads.AdView android:id=\"@+id/adView\"
                     android:layout_width=\"wrap_content\"
                     android:layout_height=\"wrap_content\"
                     android:layout_alignParentBottom=\"true\"
                     ads:adUnitId=\"id\"
                     ads:adSize=\"BANNER\"/>   
    <WebView android:layout_width=\"fill_parent\" android:id=\"@+id/webView1\" android:layout_height=\"fill_parent\"></WebView>

</LinearLayout>
及其实施的地方
public class Main extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_webview);

    WebView browser = (WebView) findViewById(R.id.webView1);
    browser.loadUrl(\"file:///android_asset/about.html\");
    AdView adView = (AdView)this.findViewById(R.id.adView);
    AdRequest request = new AdRequest();
    request.setTesting(true);
    adView.loadAd(request);
}
如您所见,xml文件中存在adsize,因此应该没有任何原因导致我收到该错误。为什么突然发生这种想法?     
已邀请:
        不知道为什么它突然停止工作,但是每当我使用Admob时,我总是将其放在单独的布局中,并使用xml这样的xml:
<RelativeLayout android:id=\"@+id/rLayAdMob\"
        android:layout_width=\"match_parent\" android:layout_height=\"50dip\">
</RelativeLayout>
然后在onCreate函数中,我将adView设置为:
adView = new AdView(Menu.this, AdSize.BANNER, MY_AD_UNIT_ID);
RelativeLayout layout = (RelativeLayout)findViewById(R.id.rLayAdMob);
layout.addView(adView);
这样,我从未遇到任何问题,只需要对您的代码进行少量更改即可。 希望这可以帮助, 肯尼     
        根据此论坛主题,Google更新了AdMob库,但尚未记录所需的更改 更改的实质是更新广告名称空间:
xmlns:ads=\"http://schemas.android.com/apk/lib/com.google.ads\" 
    

要回复问题请先登录注册