Eclipse中的Admob错误:android:configChanges [英] Admob Error in Eclipse for android:configChanges

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

问题描述

Eclipse在AndroidManifest.xml中的android: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 | orientation 没有错误,但是当我尝试编译时,编译器要求剩下的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

任何想法?

编辑:通过将SDK的低于14)文件的 project.properties default.properties 更改为:

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平台Android 4.0 - 修订版14

它也应该适用于SDK平台android 3.2 - 版本13 ,所以只需要将project.properties目标更改为 android-13 即可。基本上,您只需要确保SDK版本是13或更高版本,并且SDK SDK中安装了该SDK,并在default / project.properties中指定项目目标。

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:

http://developer.android.com/guide/topics/ manifest / activity-element.html#config

eg uiMode需要API 8级。

e.g. uiMode needs API Level 8.

从官方的AdMob文档中:

From the official AdMob Documentation:

要求

适用于Android的Google AdMob广告SDK需要Android 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).

请看这里: https://开发人员。 google.com/admob/android/quick-start

所以我认为你的工具版本至少不能升级到版本13。

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

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

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