AdMob的无法显示,因为configChanges的广告广告、AdMob、configChanges

2023-09-08 15:47:10 作者:假戏-/

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

我想在我的Andr​​oid应用程序中显示AdMob的广告。 我做的所有必要像在doc。 但是,我不能运行我的应用程序,因为在我的Andr​​oidManifest.xml在这条线的错误:

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"/>

该错误是:

error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|
 screenLayout|uiMode|screenSize|smallestScreenSize').

但是,如果我删除一些值我的应用程序正在运行,但不是广告我有这样的文字:你必须有AdActivity在AndroidManifest.xml中宣布与configChanges

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."

我不unterstand我怎么能解决这个问题。

I don't unterstand how I can fix the problem.

我使用的Andr​​oid SDK 2.1,最后谷歌AdMob的SDK 4.3.1

I'm using android SDK 2.1 and the last google adMob SDK 4.3.1

感谢

推荐答案

要解决,你必须设置你的项目构建目标至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).