Admob on android Why do I get "AFMA_buildAdURL is not defined"? -
see last comment solution.
i trying use admob android application. have tried pure code instantiation , xml , code instantiation. when try load ad, following:
10:06:52.575: i/ads(4827): use adrequest.builder.addtestdevice("hashedidformyphone") test ads on device. 10:06:52.585: i/ads(4827): starting ad request. 10:06:54.047: e/ads(1596): js: uncaught referenceerror: afma_buildadurl not defined (http://googleads.g.doubleclick.net/:1) 10:07:53.130: w/ads(4827): timed out waiting ad response. 10:07:53.130: i/ads(4827): scheduling ad refresh 60000 milliseconds now. 10:07:53.130: w/ads(4827): failed load ad: 2
note uncaught ref error happens less 2 seconds after trying load ad.
here xml layout:
<framelayout android:id="@+id/adlayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center|top" android:layout_margintop="@dimen/search_layout_top_height" > <relativelayout android:id="@+id/mapadinsert" android:layout_width="@dimen/search_layout_ad_width" android:layout_height="@dimen/search_layout_ad_height" android:layout_below="@id/layoutoptions" android:background="#ffffffff" > <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adunitid="myadmobid" ads:adsize="banner" /> </relativelayout> </framelayout>
and finally, here's code:
//admob private adview adview; @override public void oncreate(bundle savedstateinstance) { super.oncreate(savedstateinstance); setcontentview(r.layout.map_overlay); // admob create ad. adview = (adview)this.findviewbyid(r.id.adview); adrequest adrequest = new adrequest.builder() .addtestdevice("hashedidformyphone") .build(); // start loading ad in background. adview.loadad(adrequest); // end of admob
i have made signed apks (release mode) , tried debug mode; no difference. i've not been able find answers why afma_buildadurl undefined.
any insight appreciated. thanks! (and second question ever on so. if violating cultural norms here, please correct me , accept apologies.)
additional info: have tried on 2 samsung siii's. same results.
final update: asked question on google groups admob forum. eric l., believe works admob, indicated there no problem code. turned off wifi on phone , used (xubuntu) laptop bluetooth pan phone; used wireshark (and ran root , not afraid) capture bluetooth network traffic phone. quick analysis of trace indicated dns lookup phone googleads.g.doubleclick.net failing instantly. 30 minutes of emailing our (sharp) guy revealed long ago had poisoned domain in order ad block. can see ads. sure hope else gets afma_buildadurl error helped this.
short version: check see if network or android device blocking ad urls.
Comments
Post a Comment