无法看到广告logcat消息“无效的响应代码:404”

时间:2011-04-11 12:51:16

标签: android google-app-engine admob

我正在尝试使用admob在我的Android应用上显示广告。我使用Google GoogleAdMobAdsSdk-4.0.4.jar SDK 来展示广告。我无法在我的应用上看到广告,而且我在logcat中获得这些广告。我在互联网上搜索但无法得到任何解决方案。如果有人可以帮助我,那将非常感激我。

LOGCAT消息: -

04-11 18:10:18.274: INFO/Ads(376): adRequestUrlHtml: <html><head><script src="http://www.gstatic.com/afma/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":15,"u_sd":1.0,"u_w":320,"slotname":"a14da2f44bee388","simulator":1,"msid":"com.google.ads.example","cap":"m,a","js":"afma-sdk-a-v4.0.4","isu":"B3EEABB8EE11C2BE770B684D95219ECB","format":"320x50_mb","net":"ed","app_name":"4.0.4.android.com.google.ads.example","hl":"en","u_h":480,"testing":1,"u_so":"p","u_audio":4});</script></head><body></body></html>


04-11 18:10:19.384: INFO/Ads(376): Received ad url: <"url": "http://r.admob.com:80/ad_source.php?preqs=15&u_sd=1&u_w=320&slotname=a14da2f44bee388&msid=com.google.ads.example&cap=m%2Ca&js=afma-sdk-a-v4.0.4&isu=B3EEABB8EE11C2BE770B684D95219ECB&format=320x50_mb&net=ed&app_name=4.0.4.android.com.google.ads.example&hl=en&u_h=480&u_so=p&u_audio=4&adtest=on&test_action=overlay&output=html&region=mobile_app&u_tz=-330&ex=1&client_sdk=1&askip=0", "afmaNotifyDt": "null">


04-11 18:10:19.584: INFO/Ads(376): **Invalid response code: 404**


04-11 18:10:19.584: INFO/Ads(376): **onFailedToReceiveAd(There was an internal error.)**

2 个答案:

答案 0 :(得分:1)

您是否在清单中声明了Internet权限?

<uses-permission        android:name="android.permission.INTERNET" />

答案 1 :(得分:0)

最后我在我的应用中收到了广告。问题不在于我的应用,但广告在我的办公室被屏蔽。启用广告后,它现在正常运作