NativeExpressAdView - 加载广告失败:0
NativeExpressAdView - Failed to load ad: 0
我使用 NativeExpressAdView 但我无法在此警告范围内获取广告:
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播放服务版本:9.0.2
OS: 5.0
谁能帮我解决一下?
我在服务器上创建新的 Admob 横幅后通过更改广告大小解决了这个问题。您必须将广告尺寸设置为 admob 显示的尺寸范围。小/大是错误的。目前,我们只能通过硬编码设置广告尺寸,SMART_BANNER 将无法正常工作。
我使用 NativeExpressAdView 但我无法在此警告范围内获取广告:
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播放服务版本:9.0.2 OS: 5.0
谁能帮我解决一下?
我在服务器上创建新的 Admob 横幅后通过更改广告大小解决了这个问题。您必须将广告尺寸设置为 admob 显示的尺寸范围。小/大是错误的。目前,我们只能通过硬编码设置广告尺寸,SMART_BANNER 将无法正常工作。