我正在尝试在我的Android应用程序中设置AdMob,一切都运行良好,直到我在实时设备上试用它。在所有测试中,一切都运行良好,但在一些真实设备上发布和测试后,我似乎无法显示任何广告。
在logcat中,我看到以下内容:
06-19 08:20:00.333: W/Ads(765): JS: The page at about:blank displayed
insecure content from
gmsg://mobileads.google.com/loadAdURL?drt_include=1&request_scenario=online_request&type=adsense&url=http%3A%2F%2Fgoogleads.g.doubleclick.net%3A80%2Fpagead%2Fads%3Fseq_num%3D2%26rm%3D0%26js%3Dafma-sdk-a-v5050000.4452000.1%26eid%3D46621036%26hl%3Den%26smart_w%3Dfull%26gnt%3D8%26ma%3D0%26carrier%3D310410%26u_sd%3D2%26sp%3D0%26cnt%3D1%26muv%3D11%26riv%3D0%26ms%3DAabTiRkN-TWtZD6h0dgJrRLnO71LByFeBR4rsRvp7No0r7clpBJ9AjfI6tnZUcqqYnIvYCkY_gF6Ydca0k48bWpabbNvDNRupg5bFqRFpKama3sHrF12GdI2xXEboP0XkZFZxotj0eVOUTZupQvQZqYTK1Eu3MFpyMANdfhO8KGRnipiqsEuUe7kBVKlYCztSzt9scDxe5kzoKlHFM-N3KU_9wc7kG-38iCR9vwVcsRVBV5Rlog4XQlwL5VSTiBS9RNvVR4qtRh5UYzUP9w_AdqIlN7VOCIgL7P2gWns65-HH83WyCY03q1eNZKRZE_gNCzTmKCMj1UpSYKJPKl_DA%26mv%3D80280020.com.android.vending%26format%3D360x50_as%26smart_h%3Dauto%26coh%3D1%26gl%3DUS%26am%3D0%26u_w%3D360%26u_h%3D592%26msid%3Dcom.shotzoom.golfshot2%26an%3D35.android.com.shotzoom.golfshot2%26net%3Dwi%26u_audio%3D3%26u_so%3Dp%26preqs%3D1%26support_transparent_background%3Dtrue%26pimp%3D0%26currts%3D69048595%26pclick%3D0%26basets%3D69046460%26bisch%3Dtrue%26blev%3D0.9900000095367432%26cans%3D5%26canm%3Dfalse%26output%3Dhtml%26region%3Dmobile_app%26u_tz%3D-420%26url%3D35.android.com.shotzoom.golfshot2.adsenseformobileapps.com%26client%3Dca-mb-app-pub-6679563818464867%26slotname%3D9075894439%26askip%3D1%26gsb%3Dwi%26caps%3DinlineVideo_interactiveVideo_mraid1_th_autoplay_mediation_av_sdkAdmobApiForAds_di%26jsv%3D92%26urll%3D1130&base_uri=http%3A%2F%2Fgoogleads.g.doubleclick.net%3A80%2Fpagead%2Fads&use_webview_loadurl=0&google.afma.Notify_dt=1403191200323.
06-19 08:20:00.333: W/Ads(765): (null:1) 06-19 08:20:00.333: W/Web
Console(765): The page at about:blank displayed insecure content from
gmsg://mobileads.google.com/loadAdURL?drt_include=1&request_scenario=online_request&type=adsense&url=http%3A%2F%2Fgoogleads.g.doubleclick.net%3A80%2Fpagead%2Fads%3Fseq_num%3D2%26rm%3D0%26js%3Dafma-sdk-a-v5050000.4452000.1%26eid%3D46621036%26hl%3Den%26smart_w%3Dfull%26gnt%3D8%26ma%3D0%26carrier%3D310410%26u_sd%3D2%26sp%3D0%26cnt%3D1%26muv%3D11%26riv%3D0%26ms%3DAabTiRkN-TWtZD6h0dgJrRLnO71LByFeBR4rsRvp7No0r7clpBJ9AjfI6tnZUcqqYnIvYCkY_gF6Ydca0k48bWpabbNvDNRupg5bFqRFpKama3sHrF12GdI2xXEboP0XkZFZxotj0eVOUTZupQvQZqYTK1Eu3MFpyMANdfhO8KGRnipiqsEuUe7kBVKlYCztSzt9scDxe5kzoKlHFM-N3KU_9wc7kG-38iCR9vwVcsRVBV5Rlog4XQlwL5VSTiBS9RNvVR4qtRh5UYzUP9w_AdqIlN7VOCIgL7P2gWns65-HH83WyCY03q1eNZKRZE_gNCzTmKCMj1UpSYKJPKl_DA%26mv%3D80280020.com.android.vending%26format%3D360x50_as%26smart_h%3Dauto%26coh%3D1%26gl%3DUS%26am%3D0%26u_w%3D360%26u_h%3D592%26msid%3Dcom.shotzoom.golfshot2%26an%3D35.android.com.shotzoom.golfshot2%26net%3Dwi%26u_audio%3D3%26u_so%3Dp%26preqs%3D1%26support_transparent_background%3Dtrue%26pimp%3D0%26currts%3D69048595%26pclick%3D0%26basets%3D69046460%26bisch%3Dtrue%26blev%3D0.9900000095367432%26cans%3D5%26canm%3Dfalse%26output%3Dhtml%26region%3Dmobile_app%26u_tz%3D-420%26url%3D35.android.com.shotzoom.golfshot2.adsenseformobileapps.com%26client%3Dca-mb-app-pub-6679563818464867%26slotname%3D9075894439%26askip%3D1%26gsb%3Dwi%26caps%3DinlineVideo_interactiveVideo_mraid1_th_autoplay_mediation_av_sdkAdmobApiForAds_di%26jsv%3D92%26urll%3D1130&base_uri=http%3A%2F%2Fgoogleads.g.doubleclick.net%3A80%2Fpagead%2Fads&use_webview_loadurl=0&google.afma.Notify_dt=1403191200323.
06-19 08:20:00.333: W/Web Console(765): at null:1 06-19 08:20:00.372:
W/Ads(765): JS: The page at
https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html
displayed insecure content from
file:///android_asset/webkit/android-weberror.png. 06-19 08:20:00.372:
W/Ads(765): (null:1) 06-19 08:20:00.372: W/Web Console(765): The page
at
https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html
displayed insecure content from
file:///android_asset/webkit/android-weberror.png. 06-19 08:20:00.372:
W/Web Console(765): at null:1 06-19 08:20:00.747: I/Ads(31911): No
fill from ad server. 06-19 08:20:00.755: W/Ads(31911): Failed to load
ad: 3
如果“没有来自广告服务器的填充”是我看到这些错误的原因那么那就完全没问了。我只是想确保其他消息并不表示我做错了什么并且永远不会填充广告。
搜索互联网这个我发现的唯一建议是确保proguard工作正常但我现在不使用proguard所以我认为这不是一个因素
提前致谢
答案 0 :(得分:1)
根据AdMob的新政策更新您的xml布局。必须正确放置AdView,不得将广告放在其他应用内容上。
请阅读admob更新的发布商政策和指南here。
答案 1 :(得分:0)
我认为它可能与安装的Google Play服务有关。也许它们只是来自Google实施的日志。
我在没有安装Google Play服务的模拟器上获取了这些日志。
在具有Google Play服务的模拟器上出现问题。
答案 2 :(得分:-2)
原因是因为我使用SMART_BANNER而不是BANNER而发生错误,可能会遇到其他人遇到此消息的事情
编辑:
根据讨论here,这是AdMob与他们正在测试的内容相关的问题。回到BANNER而不是SMART_BANNER仍然需要我填写任何广告,但错误似乎是无关的。