android - Admob ads displaying on emulator but not real device -


i have simple activity test display of ads:

public class adtestactivity extends activity {  private adview adview;  @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     thread.setdefaultuncaughtexceptionhandler(new exceptionhandler(this));     setcontentview(r.layout.ad_test);      adview = new adview(this, adsize.banner, "[my ad id]");     linearlayout layout = (linearlayout)findviewbyid(r.id.layout_at_1);     layout.addview(adview);     adview.loadad(new adrequest()); }  @override   public void ondestroy() {     if (adview != null) {       adview.destroy();     }     super.ondestroy();   } } 

ads working fine on emulators, , on phone on adb. however, if create .apk of project , install on same phone (after uninstalling 1 adb), force closes open adtestactivity. activity declared in manifest:

    <activity         android:name=".adtestactivity"         android:label="@string/title_activity_main"         android:screenorientation="portrait" >     </activity> 

i've declared permissions:

<uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_wifi_state" /> <uses-permission android:name="android.permission.access_network_state" /> 

any idea what's going on?

edit- yes, i've disabled ad blocking on phone.

are getting classnotfoundexception or activitynotfoundexception after installing apk?

if so, please export admod jar file in build path-> order , export


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -