2
我用NativeExpressAdView但我不能這樣的警告中獲得的廣告:NativeExpressAdView - 無法加載廣告:0
06-15 09:47:32.557 13810-14512/com.bangdev.wifichua W/Ads: There was a problem getting an ad response. ErrorCode: 0 06-15 09:47:32.557 13810-13810/com.bangdev.wifichua W/Ads: Failed to load ad: 0
這是我的廣告佈局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="320x150"
ads:adUnitId="@string/unit_ads_id"/>
</LinearLayout>
加載廣告的我的代碼:
final NativeExpressAdView adView = (NativeExpressAdView) view.findViewById(R.id.adView);
adView.loadAd(new AdRequest.Builder().build());
Google play service版本:9.0.2 操作系統:5.0
任何人都可以幫我解決它?