我正在嘗試加載Admob原生廣告。之前(在應用程序更新之前)廣告曾用於顯示,但現在他們沒有顯示。我已經發布了下面的代碼,xml和Logcat。Admob廣告未加載 - 未能加載廣告:0
代碼
NativeExpressAdView adView = (NativeExpressAdView) myView.findViewById(R.id.adView);
AdRequest request = new AdRequest.Builder()
.addTestDevice("5BCFF0AAE83AF424648A954038C71DE6")
.addTestDevice("A5E3E2068BD88202CBC281AD76984BEE")//infocus
.build();
adView.loadAd(request);
XML
<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
ads:adSize="320x150"
ads:adUnitId="ca-app-pub-5059726881726792/6223900262"></com.google.android.gms.ads.NativeExpressAdView>
logcat的
07-14 20:39:57.349 11508-11508/? W/Ads: Failed to load ad: 0
07-14 20:40:07.373 11508-11663/? W/Ads: There was a problem getting an ad response. ErrorCode: 0
Fail to forward ad response.
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:511)
at com.google.android.gms.ads.internal.request.ab.a(:com.google.android.gms:93)
at com.google.android.gms.ads.internal.request.service.i.run(:com.google.android.gms:638)
at com.google.android.gms.ads.internal.util.u.call(:com.google.android.gms:1055)
at com.google.android.gms.ads.internal.util.v.run(:com.google.android.gms:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
07-14 20:40:19.539 1975-4922/? W/Ads: Fail to forward ad response.
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:511)
at com.google.android.gms.ads.internal.request.ab.a(:com.google.android.gms:93)
at com.google.android.gms.ads.internal.request.service.i.run(:com.google.android.gms:638)
at com.google.android.gms.ads.internal.util.u.call(:com.google.android.gms:1055)
at com.google.android.gms.ads.internal.util.v.run(:com.google.android.gms:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
我有完全相同的問題,我找不到解決方案 – Matteo