0
votes

I have setup the latest verion of add mob SDK GoogleAdMobAdsSdk-6.2.1.jar im able to do all the steps. But my Manifest throws a error in

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

as

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

I made a small research and found out that certain attributes are not available for my App version

2.2 Froyo

I removed those attributes and complied but the admob shows this kind of error.enter image description here

3

3 Answers

1
votes

Admob requires all of those attributes to function, so you'll need to put the rest back in. Try running a clean on the project, and making sure your targetSdkVersion is set to at least 15. If that doesn't work, you can try the solution here: I keep getting configChanges: String types not allowed error. Even with target API set to 13.

2
votes

You need to set your build target to 3.2 or above and the problem will be solved. Build target means that you can run your app to maximum which version. If i say my build target is 3.2, this means i can run my app in all the version starting from 2.2 (in your case) to 3.2. The minimum version in which you can run your app is to be specified in the uses-sdk tag in the manifest file.

For example :-

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="16" />

This means that you can run you app till version 4.1.2 and the minimum version in which it will run will be 2.2.

And also you have to use android:configChanges. Please do not remove anything from it.

1
votes

you must have adActivity declared in AndroidManifest.xml with configChanges :

Make Sure you are not missing android:configChanges attribute in AdActivity, like this:

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

Also your project needs to reference Android SDK 2.2 (API 8) and later.