Accepted answer

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

e.g. uimode needs api level 8.

from the official admob documentation:


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 to android-13).

have a look here:

so i think your tools version is not updated to at least version 13.


all new android apps created after october 14, 2011 will require an admob sdk that was released on or after march 15, 2011. this corresponds to version 4.0.2+ for android. if you downloaded the library from our official download site, then you're already set. otherwise you may have an old version of the admob sdk that was released prior to march 15, 2011, and your new app will not receive any ad impressions until you update your sdk.


did you use android:configchanges="keyboard|keyboardhidden|orientation|screenlayout|uimode|‌​screensize|smallestscreensize

or shorter one? if you change your target above 13 and use longer configchanges one (which i wrote), it should work.


easy solution: change "" file to 21

# project target.


i had the same problem so i came here.
i have downloaded the sample code from, i still had the problem with all answers above so i used the same admob sdk, they offer in the sample project. redo the build jars thing, changed target to android-15, and used the same line they use:

<activity android:name="" 

and it works!


for those using eclipse there is an easier way: right click your project folder in the left "package explorer" pane and click properties -> android -> and in the "project build target" list check off api 13 or up.

note: this is the same effect as editing which is auto-generated anyway.

this will build your project against the android 3.2 sdk which includes the terms that were previously unrecognized.

you may leave your android:minsdkversion and targetsdkversion values the same in your manifest.xml.

be warned though, if you don't set your targetsdkversion to api 12 or lower (or don't set it at all) the android system will assume that the android:configchanges values screensize and smallestscreensize (which were introduced in api 13) are accounted for and thus will be allowed to destroy-restart your activity. if you wanted to avoid this you must include those terms in your other <activity> tags (which probably only had keyboard|keyboardhidden|orientation until now).

however, if your application targets api level 12 or lower, then your activity always handles this configuration change itself (this configuration change does not restart your activity, even when running on an android 3.2 or higher device).

quote is from here.


easy solution: (and no you don't need to to change the min-sdk value !!)

step 1: change "" file

# project target.

step 2: in eclipse

project > clean... > (select your project) > clean projects selected below > ok

for a complete explanation with real example use this tutorial

cheers !

Related Query

More Query from same tag