title: Getting classcast error in using google addview services
body: <p>here is error:</p>
  
  <blockquote>
    <p>java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to com.google.android.gms.ads.AdView</p>
  </blockquote>
  
  <p><strong>adview.xml</strong></p>
  
  <pre><code>&lt;RelativeLayout android:layout_width="match_parent"
      android:layout_height="match_parent"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:ads="http://schemas.android.com/apk/res-auto"&gt;
  
          &lt;com.google.android.gms.ads.AdView
              android:id="@+id/adView"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              ads:adSize="BANNER"
              ads:adUnitId="@string/banner_ad_unit_id" &gt;
          &lt;/com.google.android.gms.ads.AdView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>