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 8858553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:51:21+00:00 2026-06-14T14:51:21+00:00

My xml: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools xmlns:ads=http://schemas.android.com/apk/lib/com.google.ads android:layout_width=match_parent android:layout_height=match_parent android:background=#000000 android:orientation=vertical > <com.google.ads.AdView android:id=@+id/ad android:layout_width=wrap_content

  • 0

My xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000"
    android:orientation="vertical" >
<com.google.ads.AdView android:id="@+id/ad"
                           android:layout_width="wrap_content"
                           android:layout_height="wrap_content"
                           ads:adSize="SMART_BANNER"
                           ads:adUnitId="@string/admob_unit_id"
                           ads:testDevices="@string/test_device"
                           ads:loadAdOnCreate="true"/>

</LinearLayout>

Error in logcat:

11-05 09:32:30.593: I/Ads(2052): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":18,"session_id":"1804074505668833558","seq_num":"19","slotname":"a150940f47b619f","u_w":320,"msid":"com.ad.aksharamaala.hd","js":"afma-sdk-a-v6.2.1","bas_off":0,"net":"wi","app_name":"3.android.com.ad.aksharamaala.hd","hl":"en","smart_w":"full","gnt":8,"carrier":"40407","u_audio":3,"kw":[],"u_sd":1,"mv":"8015016.com.android.vending","isu":"EB83E0FCC98011A7D8B65831A838375F","cipa":0,"format":"320x50_mb","oar":0,"smart_h":"auto","ad_pos":{"height":0,"visible":1,"y":480,"x":0,"width":320},"u_h":480,"bas_on":0,"ptime":998246});</script></head><body></body></html>
11-05 09:32:30.953: W/webcore(2052): Can't get the viewWidth after the first layout
11-05 09:32:30.953: I/Ads(2052): Received ad url: <url: "http://googleads.g.doubleclick.net:80/mads/gma?preqs=18&session_id=1804074505668833558&seq_num=19&u_w=320&msid=com.ad.aksharamaala.hd&js=afma-sdk-a-v6.2.1&bas_off=0&net=wi&app_name=3.android.com.ad.aksharamaala.hd&hl=en&smart_w=full&gnt=8&carrier=40407&u_audio=3&kw&u_sd=1&mv=8015016.com.android.vending&isu=EB83E0FCC98011A7D8B65831A838375F&cipa=0&format=320x50_mb&oar=0&smart_h=auto&u_h=480&bas_on=0&ptime=998246&u_so=p&output=html&region=mobile_app&u_tz=-330&client_sdk=1&ex=1&slotname=a150940f47b619f&kw_type=broad&askip=3&gsb=wi&caps=interactiveVideo_th_mediation_sdkAdmobApiForAds_di&jsv=40" type: "admob" afmaNotifyDt: "null" useWebViewLoadUrl: "false">
11-05 09:32:30.953: I/Ads(2052): Request scenario: Online server request.
11-05 09:32:30.973: W/Ads(2052): IOException connecting to ad url.
11-05 09:32:30.973: W/Ads(2052): java.net.ConnectException: googleads.g.doubleclick.net/127.0.0.1:80 - Connection refused
11-05 09:32:30.973: W/Ads(2052):    at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:254)
11-05 09:32:30.973: W/Ads(2052):    at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)
11-05 09:32:30.973: W/Ads(2052):    at java.net.Socket.connect(Socket.java:1055)
11-05 09:32:30.973: W/Ads(2052):    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:62)
11-05 09:32:30.973: W/Ads(2052):    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)
11-05 09:32:30.973: W/Ads(2052):    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)
11-05 09:32:30.973: W/Ads(2052):    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:909)
11-05 09:32:30.973: W/Ads(2052):    at com.google.ads.internal.f.b(SourceFile:459)
11-05 09:32:30.973: W/Ads(2052):    at com.google.ads.internal.f.run(SourceFile:430)
11-05 09:32:30.973: W/Ads(2052):    at java.lang.Thread.run(Thread.java:1096)
11-05 09:32:30.973: D/webviewglue(2052): nativeDestroy view: 0x390bf8
11-05 09:32:30.973: I/Ads(2052): onFailedToReceiveAd(A network error occurred.)

Can anyone tell me where am I making mistake?

  • 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-06-14T14:51:22+00:00Added an answer on June 14, 2026 at 2:51 pm

    if you look closely in the log you posted, on line 6 you will notice that googleads.g.doubleclick.net resolves to 127.0.0.1. This usually means that the hosts file on your phone was tampered, with the purpose of blocking ads in all your apps.

    If you’re running this on an emulator, either your emulator’s hosts file was tampered, or your computer’s OS hosts file. You should check those out.

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

Sidebar

Related Questions

I am using the following xml for Layout. <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools android:layout_width=match_parent android:layout_height=match_parent android:orientation=vertical
My XML: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools android:layout_width=match_parent android:layout_height=match_parent android:orientation=horizontal android:weightSum=1 > <LinearLayout android:id=@+id/leftLayout android:layout_width=0dp android:layout_height=match_parent
This is a XML LinearLayout linlayout.xml : <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools android:id=@+id/mylinear android:layout_width=match_parent android:layout_height=match_parent android:orientation=vertical>
Below is my layout xml file: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools android:id=@+id/LinearLayout1 android:layout_width=match_parent android:layout_height=match_parent android:orientation=horizontal >
main.xml <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/root android:layout_width=match_parent android:layout_height=wrap_content android:orientation=vertical > <LinearLayout android:id=@+id/horizontal android:layout_width=fill_parent
I've this xml: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical > <ImageView android:src=@drawable/head
Here is my layout <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:id=@+id/LinearLayout01 android:layout_height=wrap_content> <Spinner android:text=@+id/AutoCompleteTextView01
This is my code: <?xml version=1.0 encoding=utf-8?> LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools android:layout_width=match_parent android:layout_height=match_parent android:orientation=horizontal <EditText
<?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent > I get these two errors
<?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical > <ImageView android:id=@+id/venueImage android:layout_width=wrap_content android:layout_height=wrap_content/> </LinearLayout>

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.