android - No test ads are loaded with AdMob -
i have tried display test ad in fragment, according admob tutorial.
i have following code in fragment 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/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="com.example.myapp.detailfragment"> <textview android:id="@+id/txvtitle" style="@style/textappearance.appcompat.headline" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/title"/> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adsize="banner" ads:adunitid="@string/banner_ad_unit_id"> </com.google.android.gms.ads.adview> </linearlayout>
the banner_ad_unit_id taken tutorial (as test id):
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
i have following code in fragment class:
public void onviewcreated(view view, bundle savedinstancestate) { super.onviewcreated(view, savedinstancestate); adview madview = (adview) view.findviewbyid(r.id.adview); adrequest adrequest = new adrequest.builder() .addtestdevice(my_test_id_by_ads_log) .build(); madview.loadad(adrequest); }
according admob tutorial, test ads should visible.
all in log strange codec error error 0 , error 3:
02-06 15:45:01.003 12285-12285/com.example.myapp.free e/appstreamingfragment: [mediacodecrenderer] failed initialize codec supporting video/avc java.lang.illegalargumentexception @ android.media.mediacodeclist.getcodeccapabilities(native method) @ android.media.mediacodecinfo.getcapabilitiesfortype(mediacodecinfo.java:211) @ com.google.android.libraries.appstreaming.framework.j.a(sourcefile:82) @ com.google.android.libraries.appstreaming.framework.d.<init>(sourcefile:18) @ com.google.android.gms.ads.internal.overlay.ay.<clinit>(sourcefile:11) @ com.google.android.gms.ads.internal.t.a(sourcefile:14) @ com.google.android.gms.ads.l.a(sourcefile:61) @ com.google.android.gms.ads.admanagercreatorimpl.a(sourcefile:99) @ com.google.android.gms.ads.internal.client.ah.ontransact(sourcefile:91) @ android.os.binder.transact(binder.java:326) @ com.google.android.gms.ads.internal.client.zzv$zza$zza.zza(unknown source) @ com.google.android.gms.ads.internal.client.zze.zza(unknown source) @ com.google.android.gms.ads.internal.client.zze.zza(unknown source) @ com.google.android.gms.ads.internal.client.zzab.zzdh(unknown source) @ com.google.android.gms.ads.internal.client.zzab.zzdg(unknown source) @ com.google.android.gms.ads.internal.client.zzab.zza(unknown source) @ com.google.android.gms.ads.baseadview.loadad(unknown source) @ com.google.android.gms.ads.adview.loadad(unknown source) @ ccom.example.myapp.free.detailfragment.onviewcreated(detailfragment.java:126) @ android.app.fragmentmanagerimpl.movetostate(fragmentmanager.java:843) @ android.app.fragmentmanagerimpl.movetostate(fragmentmanager.java:1035) @ android.app.backstackrecord.run(backstackrecord.java:635) @ android.app.fragmentmanagerimpl.execpendingactions(fragmentmanager.java:1397) @ android.app.fragmentmanagerimpl$1.run(fragmentmanager.java:426) @ android.os.handler.handlecallback(handler.java:615) @ android.os.handler.dispatchmessage(handler.java:92) @ android.os.looper.loop(looper.java:137) @ android.app.activitythread.main(activitythread.java:4802) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:511) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:813) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:580) @ dalvik.system.nativestart.main(native method) 02-06 15:45:01.099 12371-12371/com.example.myapp.free i/ads: starting ad request. 02-06 15:45:01.619 498-1530/? i/activitymanager: start proc com.google.android.gms service com.google.android.gms/.ads.adrequestbrokerservice: pid=12569 uid=10010 gids={3003, 1015, 1028, 2001, 1007, 3006, 1006, 3002, 3001} 02-06 15:45:02.499 12569-12569/? i/activitythread: pub com.google.android.gms.download: com.google.android.gms.common.download.provider.downloadsprovider 02-06 15:45:02.539 12569-12569/? i/activitythread: pub com.google.android.gms.ads.adinfo: com.google.android.gms.ads.adinfo.advertisinginfocontentprovider 02-06 15:45:05.599 12569-12569/? w/dalvikvm: vfy: unable resolve virtual method 8548: lcom/google/android/gms/ads/internal/u/k;.isattachedtowindow ()z 02-06 15:45:07.499 12371-12384/com.example.myapp.free i/ads: no fill ad server. 02-06 15:45:07.499 12371-12371/com.example.myapp.free i/ads: scheduling ad refresh 60000 milliseconds now. 02-06 15:45:07.499 12371-12371/com.example.myapp.free w/ads: failed load ad: 3 02-06 15:46:07.599 12371-12371/com.example.myapp.free i/ads: starting ad request. 02-06 15:46:07.989 12371-12384/com.example.myapp.free i/ads: no fill ad server. 02-06 15:46:07.989 12371-12371/com.example.myapp.free i/ads: scheduling ad refresh 60000 milliseconds now. 02-06 15:46:07.989 12371-12371/com.example.myapp.free w/ads: failed load ad: 3 02-06 15:47:08.009 12371-12371/com.example.myapp.free i/ads: starting ad request. 02-06 15:47:08.479 12371-12384/com.example.myapp.free i/ads: no fill ad server. 02-06 15:47:08.479 12371-12371/com.example.myapp.free i/ads: scheduling ad refresh 60000 milliseconds now. 02-06 15:47:08.479 12371-12371/com.example.myapp.free w/ads: failed load ad: 3 02-06 15:48:08.509 12371-12371/com.example.myapp.free i/ads: starting ad request. 02-06 15:48:08.829 12371-12385/com.example.myapp.free i/ads: no fill ad server. 02-06 15:48:08.829 12371-12371/com.example.myapp.free i/ads: scheduling ad refresh 60000 milliseconds now. 02-06 15:48:08.829 12371-12371/com.example.myapp.free w/ads: failed load ad: 3 02-06 15:49:08.889 12371-12371/com.example.myapp.free i/ads: starting ad request. 02-06 15:49:09.359 12371-12385/com.example.myapp.free i/ads: no fill ad server. 02-06 15:49:09.359 12371-12371/com.example.myapp.free i/ads: scheduling ad refresh 60000 milliseconds now. 02-06 15:49:09.369 12371-12371/com.example.myapp.free w/ads: failed load ad: 3 02-06 15:50:09.429 12371-12371/com.example.myapp.free i/ads: starting ad request. 02-06 15:50:09.989 12569-16804/? w/ads: received error http response code: 403 02-06 15:50:09.989 12371-12384/com.example.myapp.free w/ads: there problem getting ad response. errorcode: 0 02-06 15:50:09.989 12371-12371/com.example.myapp.free w/ads: failed load ad: 0
what else should set?
Comments
Post a Comment