由于 configChanges,AdMob 无法展示广告

发布于 2024-12-12 04:02:37 字数 931 浏览 6 评论 0原文

可能的重复:
Android 的 Eclipse 中的 Admob 错误:configChanges

我想在我的应用程序中显示 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烦人精 2024-12-19 04:02:37

要解决此问题,您必须将项目构建目标设置为 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).

掌心的温暖 2024-12-19 04:02:37

您也可以忽略较新的 configchanges 设置并使其像旧版本一样:

configChanges="keyboard|keyboardHidden|orientation"

这是我在 admob 广告活动中一直拥有的内容。新东西可能适用于 android 3+。

You can also just ignore the newer configchanges setting and make it like the old version has:

configChanges="keyboard|keyboardHidden|orientation"

This is what I always had in my admob ad activity. The new stuff is propably for android 3+.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文