2017-01-21 99 views
1

我现在在使用AdMob和广告方面存在一些问题。AdMob在较小的屏幕尺寸上无法加载广告

问题是,广告在更大的屏幕尺寸上加载得很好,例如,我的Samsung S7 Edge加载广告并显示它。但是,在我的Galaxy S3和Galaxy S4 mini上,广告无法加载。

与广告标签输出:

14127-14127/com.example I/Ads: Starting ad request. 
14127-14138/com.example W/Ads: There was a problem getting an ad response. ErrorCode: 0 
14127-14127/com.example W/Ads: Failed to load ad: 0 

我的布局文件:

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:ads="http://schemas.android.com/apk/res-auto"> 
    <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="match_parent" android:layout_height="match_parent" 
     android:id="@+id/main_rv_playlists" 
     android:padding="16dp" 
     android:layout_above="@+id/main_adview" 
     /> 

    <com.google.android.gms.ads.AdView 
     android:id="@+id/main_adview" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_centerHorizontal="true" 
     ads:adSize="SMART_BANNER" 
     ads:adUnitId="@string/main_banner_id" 
     /> 
</RelativeLayout> 

代码:

AdView adView = (AdView) findViewById(R.id.main_adview); 
     AdRequest.Builder builder = new AdRequest.Builder(); 
     adView.loadAd(builder.build()); 

正如你所看到的,我没有使用任何填充与我的根视图,广告视图的宽度设置为match_parent,所以e应该有足够的空间。 adSize设置为SMART_BANNER。如果我将设备添加为测试设备,测试广告的效果不佳,但仍不会显示广告。

插页式广告不适用于较小的设备,它们正在处理更大的广告。

广告单元本身是旧的,就像我说的,它可以在更大的屏幕尺寸上工作,所以广告单元本身不是问题。而且我的帐户不会被暂停或任何事情。实际上,我仍然从广告中获得一些收入,但节目的收视率大约为65%。

我甚至尝试使用MoPub作为替代品,它仍然显示在我的S7边缘但不在我的S3上。

我试过了所有可能的解决方案,我可以找到,没有任何工作。

+0

我的问题始于2017年1月10日左右。从那时起,我的显示率从99%下降到88%到90%左右。我不知道是什么原因造成的,但它可能是你遇到的同样的问题。我发布了一个问题(http://stackoverflow.com/questions/41938459/sudden-drop-in-admob-show-rate),但没有答案。 – user4617883

+0

你确定这是一个尺寸问题?你的S3有什么版本的Android? – user4617883

回答

0

我们通过反复试验了解了这一点,但看起来如果AdMob确定没有足够的可用空间来显示整个广告,它将不会返回一个广告,这将解释您在小广告上遇到的情况设备。