Admob in Android 2.2

1,435 views
Skip to first unread message

Michael Leung

unread,
Nov 9, 2011, 5:38:26 AM11/9/11
to Google AdMob Ads Developers
Hi all,
I am new to Android Development. I built an app for Android 2.2+. I
tried to plug-in AdMob.
But I got this error:
You must have AdActivity declared in AndroidManifest.xml with
configChanges.
I have put this in AndroidManifest.xml
<activity android:name="com.google.ads.AdActivity"
android:configChanges="orientation|keyboard|
keyboardHidden" />

Is it because of the latest SDK needs the app run in API 14?
Thanks!

Eric Leichtenschlag

unread,
Nov 10, 2011, 3:37:10 PM11/10/11
to google-adm...@googlegroups.com
Hi Michael,

The latest SDK requires some additional configChanges.  There is the new AdActivity definition.

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

Some of these configChanges weren't introduced until API 13, so you will need to compile against API 13 or greater.  You can do this by getting Android 3.2 SDK and setting your project.properties target to android-13.  You can still target your app for 2.2+ by setting minSdkVersion=8 in your manifest.

Cheers,
Eric, AdMob SDK Support

Andy

unread,
Dec 3, 2011, 10:30:21 AM12/3/11
to Google AdMob Ads Developers
Hi Michael,

I have changed the project properties to set Android version 3.2, and
in default.properties (target-13).

So Admob(4.3.1) configChanges are compiled.

I have set min sdk to 8 in the manifest file as well.

Now the app runs on 2.2 as well, but the Ads are not running on 2.2.
So does that mean Ads will only run on from 3.2 Android version?

Pls let me know.

Thanks,
Andy

On Nov 10, 9:37 pm, Eric Leichtenschlag <eleichtens...@google.com>
wrote:


> Hi Michael,
>
> The latest SDK requires some additional configChanges.  There is the new
> AdActivity definition.
>
>  <activity android:name="com.google.ads.AdActivity"
>

> android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiM ode|screenSize|smallestScreenSize"/>

kunal verma

unread,
Dec 5, 2011, 1:12:23 PM12/5/11
to google-adm...@googlegroups.com

No the ads will run on all versions of android if you have set the target 13 or 14 in the default.properties file, it will still show ads ads in android versions from 1.5 to 3.2(13) or 4.0(14)
However you can set the min version to 3 (1.5) too for your apps to all lower android devices too,  it would be better

Michael Leung

unread,
Dec 5, 2011, 7:50:41 PM12/5/11
to google-adm...@googlegroups.com
I found the older version of admob lib. That is running.  
--
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

kunal verma

unread,
Dec 5, 2011, 8:00:12 PM12/5/11
to google-adm...@googlegroups.com

Prefering the new admob version and using it would be better as there a lot of error improvements in it
change target in default properties,  after changing the target version to 14(i.e.4.0, for this you also need to have the Android sdk of android 4.0 in your sdk folder) , the rest you are doing fine
..

Reply all
Reply to author
Forward
0 new messages