Android XML Error解析XML未绑定前缀

bad*_*he5 2 xml eclipse android

我有2个错误,但我有一个修复.我仍然有错误解析XML未绑定前缀错误你在com.admob.android.ads wats错了吗?

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" 
/>

<com.admob.android.ads.AdView
  android:id="@+id/ad" 
  android:layout_width="fill_parent" 
  android:layout_height="wrap_content"
  xmlns:backgroundColor="#000000"
  xmlns:primaryTextColor="FFFFFF"
  xmlns:secondaryTextColor="#CCCCCC"
  android:layout_alignParentTop="true"
  ads:adUnitId="xxxxxxxxxxxx"
  ads:adSize="BANNER"
  ads:loadAdOnCreate="true"
  /> 
</RelativeLayout>     
Run Code Online (Sandbox Code Playgroud)

ono*_*nof 12

您需要在主标签(RelativeLayout)上设置布局配置并设置广告的命名空间:

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
>      
Run Code Online (Sandbox Code Playgroud)