Admob Error in Eclipse for android:configChanges

Mark Cameron picture Mark Cameron · Oct 26, 2011 · Viewed 68.4k times · Source

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>

the error is:

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

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

I'm using GoogleAdMobAdsSDK-4.3.1.

Any ideas?

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

# Project target.
target=android-14

and in my SDK Manager having the SDK Platform Android 4.0 - Revision 14 installed.

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.

Answer

Dax picture Dax · Feb 6, 2012

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

Step 1: Change "project.properties" file

# Project target.
target=android-13

Step 2: In Eclipse

Project > Clean... > (select your project) > Clean projects selected below > OK

For a complete explanation with real example use this tutorial http://www.monkeycoder.co.nz/Community/posts.php?topic=1121

Cheers !