制作AdMob的工作在Android 2.3设备? [英] Making AdMob work on Android 2.3 device?

查看:121
本文介绍了制作AdMob的工作在Android 2.3设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,所以我读了很多文章,问题和答案,但仍然无法找到一个适合我...

我想告诉AdMob广告横幅在一个Android应用程序。 我使用Eclipse和最新的AdMob的SDK(4.3.1),需要的Andr​​oid 3.2(13)工作。 事情是,我的测试设备只能2.3.3(10)。

-

最好的,我已经走到这一步,是应用程序编译反对的Andr​​oid 2.3.3,在设备上运行,并横幅显示出来,但此消息:您必须AdActivity在AndroidManifest声明。 XML与configChanges ...

在这种情况下,configChanges属性设置为键盘| keyboardHidden |定位 如果我更改为全的版本(通过添加|屏幕布置| uiMode |屏幕尺寸| smallestScreenSize),它并不能编译了,因为这些PARAMS需要的Andr​​oid 3.2。

-

我读过,这是可以通过编译针对Android的SDK 13,同时保持10作为的minSdkVersion 。我已经试过了,该configChanges属性现在已满,不产生错误,但现在Eclipse显示我的设备不与3.2兼容,应用程序崩溃,如果我跑也无妨。

-

但显然人们似乎得到AdMob的工作在较旧的设备,不是吗?那么,怎么样?

如果AdMob的4.3.1要求至少安卓3.2无论是什么,是有一个旧版本的2.3兼容?

我真的很困惑在这里... 由于任何人谁就能摆脱一些这。

解决方案

 <活动机器人:名称=com.google.ads.AdActivity
        机器人:configChanges =键盘| keyboardHidden |定位>
    < /活性GT;
 

我可以与AdMob的4.1.1,还没有试过4.3.1呢。

Ok so I've read a lot of articles, questions and answers but still can't find one that works for me...

I'm trying to show an AdMob banner in an Android app. I'm using Eclipse and the latest AdMob SDK (4.3.1), which requires Android 3.2 (13) to work. Thing is, my test device is only 2.3.3 (10).

--

The best I've got so far is the app compiling against Android 2.3.3, running on the device, and a banner showing up but with this message: You must have AdActivity declared in AndroidManifest.xml with configChanges...

In this case, the configChanges attributes is set to "keyboard|keyboardHidden|orientation" If I change it for the "full" version (with the addition of "|screenLayout|uiMode|screenSize|smallestScreenSize"), it doesn't compile anymore, as these params require Android 3.2.

--

I've read that it is possible to compile against Android SDK 13 while keeping 10 as the minSdkVersion. I've tried that, the configChanges attribute is now full and does not generate an error, but Eclipse now shows my device as not compatible with 3.2, and the app crashes if I run it anyway.

--

But obviously people seem to get AdMob working on older devices, no? So, how?

If AdMob 4.3.1 requires at least Android 3.2 no matter what, is there an older version that's compatible with 2.3?

I'm really confused here... Thanks to anyone who will be able to shed some light on this.

解决方案

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

works for me with admob 4.1.1, haven't tried 4.3.1 yet.

这篇关于制作AdMob的工作在Android 2.3设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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