由于 configChanges,AdMob 无法展示广告
我想在我的应用程序中显示 AdMob 的广告安卓应用程序。 我像文档中那样做了所有必要的事情。 但我无法运行我的应用程序,因为我的 AndroidManifest.xml 上的这一行有错误:
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
错误是:
error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|
screenLayout|uiMode|screenSize|smallestScreenSize').
但是如果我删除某些值,我的应用程序正在运行,但我没有广告,而是显示了以下文本:“您必须在 AndroidManifest.xml 中使用 configChanges 声明 AdActivity。”
我不明白如何解决这个问题。
我正在使用 android SDK 2.1 和最后一个 google adMob SDK 4.3.1
谢谢
Possible Duplicate:
Admob Error in Eclipse for android:configChanges
I want to display AdMob's ads in my android application.
I do all the necessary like in the doc.
But I can't run my app because there is an error on my AndroidManifest.xml on this line :
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
The error is :
error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|
screenLayout|uiMode|screenSize|smallestScreenSize').
But if I delete some value my app is running but instead of the ads I've this text : "You must have AdActivity declared in AndroidManifest.xml with configChanges."
I don't unterstand how I can fix the problem.
I'm using android SDK 2.1 and the last google adMob SDK 4.3.1
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要解决此问题,您必须将项目构建目标设置为 Android 3.2 或更高版本,请参阅文档中的要求部分(Android 选项卡)。
To fix the problem you have to set your project build target to Android 3.2 or higher, see the requirements section in the documentation (Android tab).
您也可以忽略较新的 configchanges 设置并使其像旧版本一样:
这是我在 admob 广告活动中一直拥有的内容。新东西可能适用于 android 3+。
You can also just ignore the newer configchanges setting and make it like the old version has:
This is what I always had in my admob ad activity. The new stuff is propably for android 3+.