我現在在使用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上。
我試過了所有可能的解決方案,我可以找到,沒有任何工作。
我的問題始於2017年1月10日左右。從那時起,我的顯示率從99%下降到88%到90%左右。我不知道是什麼原因造成的,但它可能是你遇到的同樣的問題。我發佈了一個問題(http://stackoverflow.com/questions/41938459/sudden-drop-in-admob-show-rate),但沒有答案。 – user4617883
你確定這是一個尺寸問題?你的S3有什麼版本的Android? – user4617883