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

  • Home
  • SEARCH
  • 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 6073855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:19:02+00:00 2026-05-23T10:19:02+00:00

I did some updates to my application today but now admob dont work right

  • 0

I did some updates to my application today but now admob dont work right and it gives me an error in the ad saying adview missing xml attribute "adsize". now the changes i made have nothing to do with the ads and they have been the same since I implemented them and worked

this is my 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>

and where its implemented

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);
}

as you can see adsize is there in the xml file so there should be no reason why I should be getting that error. Ideas as to why this is happening all of the sudden?

  • 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-23T10:19:03+00:00Added an answer on May 23, 2026 at 10:19 am

    No idea why its suddenly stoped working but whenever i use Admob i always put it in a seperate layout, with xml like:

    <RelativeLayout android:id="@+id/rLayAdMob"
            android:layout_width="match_parent" android:layout_height="50dip">
    </RelativeLayout>
    

    Then in the onCreate function i setup the adView like:

    adView = new AdView(Menu.this, AdSize.BANNER, MY_AD_UNIT_ID);
    RelativeLayout layout = (RelativeLayout)findViewById(R.id.rLayAdMob);
    layout.addView(adView);
    

    I’ve never had any issues doing it this way, and would only require a small change to your code.

    Hope this helps,

    Kenny

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A while ago I did some work in Qt for C++; now I'm working
I did some googling to try to answer this question but even after that
Today, no matter what I did, my application just would not recognise a change
I am doing an sample application, where I want to tweet some updates to
Did some searches here & on the 'net and haven't found a good answer
Did some googling and couldn't find a clear answer on this. My assumption is
I did some tests a while ago and never figured out how to make
I did some HTTP monitoring with WireShark. Are there more tools like this that
I did some timing tests and also read some articles like this one (last
Why did some processor manifacturers decide to use Little endian Big endian Middle endian

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.