Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7411011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:19:15+00:00 2026-05-29T06:19:15+00:00

I attempted to display adds using code below. I got the error AdView missing

  • 0

I attempted to display adds using code below.
I got the error “AdView missing requied xml attribute adSize“.

What is the problem?

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/res/com.jms.AdmobExample"
       android:orientation="vertical"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent" >

 <com.google.ads.AdView     
       android:id="@+id/adView"
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content"
       ads:adSize="BANNER"
       ads:adUnitId="a14f1d807e488dd" />
</LinearLayout>

attr.xml:

  <?xml version="1.0" encoding="utf-8"?>
     <resources>
     <declare-styleable name="com.google.ads.AdView">
     <attr name="adSize">
     <enum name="BANNER" value="1"/>
     <enum name="IAB_MRECT" value="2"/>
     <enum name="IAB_BANNER" value="3"/>
     <enum name="IAB_LEADERBOARD" value="4"/>
  </attr>
  <attr name="adUnitId" format="string"/>
 </declare-styleable>
</resources>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:19:16+00:00Added an answer on May 29, 2026 at 6:19 am

    use this

     <LinearLayout
       xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:ads="http://schemas.android.com/apk/res/com.jms.AdmobExample"
       android:orientation="vertical"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent" >
    
        <com.google.ads.AdView
            xmlns:ads="http://schemas.android.com/apk/res/com.jms.AdmobExample"
            android:id="@+id/add_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"            
            ns:adSize="BANNER"
            ns:adUnitId="a14f1d807e488dd" >
        </com.google.ads.AdView>
    
     </Linearlayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with my code. I am trying to display a load
I got an error saying Attempted access of inaccessible method rotation through a reference
I am getting an error when I attempt to display a datetime value in
I attempted to open a Java bug last Halloween. I immediately got a response
I'm using stream.publish to write to the user's wall and attempted to get @
I have attempted to start programming with OpenGl using this tutorial , and have
I am using a UIWebView to display HTML formatted text. I am not loading
I attempted today to create a Python code to invert the colors of a
Attempted translation of the above question from non-native English to English: This is a
I attempted to open a C#/VB form in designer mode, and instead of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.