在Eclipse Admob的错误为Android:configChanges [英] Admob Error in Eclipse for android:configChanges

查看:205
本文介绍了在Eclipse Admob的错误为Android:configChanges的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Eclipse正在让我对Android的错误:在我的Andr​​oidManifest.xml configChanges行:

Eclipse is giving me an error on the android:configChanges line in my AndroidManifest.xml:

<activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"></activity>

该错误是:

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

如果我只留下键盘| keyboardHidden |。方向有没有错误,但是编译器要求时,我尝试建立了4其余的

If I leave only keyboard|keyboardHidden|orientation there's no error, but compiler asks for the 4 remaining ones when I try and build.

我用 GoogleAdMobAdsSDK-4.3.1

任何想法?

编辑:我得到它的工作,通过改变我的 project.properties default.properties 的关于SDK的低则14)文件:

I got it working by changing my project.properties (default.properties on SDK's lower then 14) file to:

# Project target.
target=android-14

和我的 SDK管理器具有 SDK平台的Andr​​oid 4.0 - 修订版14 安装

这也应该工作的 SDK平台的Andr​​oid 3.2 - 修订版13 的,所以你只需要改变project.properties目标的的android-13 的,如果是这样的话。基本上你只需要确保该SDK版本是13或以上,您有安装在SDK经理和项目目标默认/ project.properties指向它的SDK。

It should also work for SDK Platform android 3.2 - revision 13, so you just have to change the project.properties target to android-13 if that is the case. Basically you just have to make sure that the SDK revision is 13 or above, and that you have that SDK installed in the SDK manager and the project target in default/project.properties pointing to it.

推荐答案

答案很简单:所提到的配置更改不会在Android 2.1的支持,看看这里:

Simple answer: the mentioned config changes are not support in Android 2.1, have a look here:

<一个href="http://developer.android.com/guide/topics/manifest/activity-element.html#config">http://developer.android.com/guide/topics/manifest/activity-element.html#config

例如。 uiMode需要API级别8。

e.g. uiMode needs API Level 8.

从官方AdMob的文档:

From the official AdMob Documentation:

要求

在谷歌的AdMob广告SDK为Android所需的Andr​​oid 1.5或更高版本。 请确保您有Android SDK的最新副本,并且你对编译至少Android的V3.2 (设置目标default.properties到Android-13)。

The Google AdMob Ads SDK for Android requires Android 1.5 or later. Make sure you have the latest copy of the Android SDK and that you're compiling against at least Android v3.2 (set target in default.properties to android-13).

看看这里:<一href="http://$c$c.google.com/intl/de-DE/mobile/ads/docs/android/fundamentals.html">http://$c$c.google.com/intl/de-DE/mobile/ads/docs/android/fundamentals.html

所以,我觉得你的工具版本没有更新到至少13。

So I think your tools version is not updated to at least Version 13.

这篇关于在Eclipse Admob的错误为Android:configChanges的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆