简体   繁体   English

无法在我的Android应用中实施google adsense

[英]failed to Implementing google adsense in my android app

I signed to adsense and got my id to use adsense mechanism. 我签署了adsense并获得了ID以使用adsense机制。 I followed the tutorial http://code.google.com/intl/iw/mobile/afma_ads/docs/android/ and did exactly like the incomprehensible tutorial (Very surprising). 我按照教程http://code.google.com/intl/iw/mobile/afma_ads/docs/android/进行操作,并且确实类似于难以理解的教程(非常令人惊讶)。 Also the jar file that i supposed to add to my libs not available in the site and i downloaded it from http://www.java2s.com/Code/Jar/g/DownloadGoogleAdViewjar.htm . 另外,我应该添加到我的库中的jar文件在站点中不可用,我从http://www.java2s.com/Code/Jar/g/DownloadGoogleAdViewjar.htm下载了该文件。 When i load my app i get a banner filled with "AD TEST" strings. 当我加载我的应用程序时,我得到一个标有“ AD TEST”字符串的横幅。 When i tried to change the boolean parameter in setAdTestEnabled to false i got empty banner (not visible). 当我尝试将setAdTestEnabled中的boolean参数更改为false时,我得到了空横幅(不可见)。

Does anyone run into such behavior using adsense? 有人使用adsense遇到这种行为吗?

Does anyone know better tutorial? 有谁知道更好的教程?

Does AdMob and Adsense connected to google? AdMob和Adsense是否已连接到Google?

If the test ad worked it could be that you have either not set your unique ID in your adWords account or its just not been activated yet therefor there are no images to retrieve. 如果测试广告的工作这可能是因为你有未设置你的唯一的ID AdWords帐户或者它只是为此没有图像检索尚未激活。

Another reason could be that the image that it did retrieve doesnt fit into the view you have gave it. 另一个原因可能是它确实检索到的图像不适合您提供的视图。 Something like that should throw an exception so have a look through your code in debug and see if it does throw an error 这样的事情应该引发异常,因此请在调试中浏览代码,看看是否确实引发了错误

You are looking at an old old version of the Ads SDK. 您正在查看旧版本的Ads SDK。 The download link probably isn't on the site anymore because it is now recommended/required to use the Google AdMob Ads SDK . 下载链接可能不再存在于网站上,因为现在建议/要求使用Google AdMob Ads SDK It is a rewrite of the Google Ads SDK, and it has active support and documentation. 它是对Google Ads SDK的重写,并且具有有效的支持和文档。 I recommend trying it out, and any questions you may have you can ask on the support forum . 我建议您尝试一下,如果您有任何疑问,可以在支持论坛上提出

Side Note: I say using the new SDK is required because if you read through the the documentation, you will find a warning saying all new sites and apps created after October 14th, 2011 have to use the Google AdMob Ads SDK. 旁注:我说必须使用新的SDK,因为如果您仔细阅读本文档,将会发现一条警告,指出在2011年10月14日之后创建的所有新网站和应用都必须使用Google AdMob Ads SDK。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM