MemLeak
MemLeak

Reputation: 4640

AdMob for Android 2.1

I'm using AdMob SDK 6.0.1, works proper with android 4+ but i can't get it working for android 2.1. Is there a way to get an former AdMobSDK? Or an other way?

Edit1 :

Niek:

Your android:targetSdkVersion should be high enough (e.g. 15), your android:minSdkVersion can be 7 for example. That way it should work with the newest AdMobSDK. See also: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

this doesn't work:

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

If I remove the screenSize and Smallest Screen following errors occur:

The android:configChanges value of the com.google.ads.AdActivity must include screenSize. 
The android:configChanges value of the com.google.ads.AdActivity must include smallestScreenSize.

Problem with the running App:

Error on View

Edit: 2 Solution:

Andrea Bresolin:

in Eclipse go to "Project (menu)->Properties->Android" and make sure you select Android 3.2 or higher as the Project Build Target (this is the key to make all the items in configChanges known to the compiler at compile time)

Upvotes: 0

Views: 1234

Answers (2)

Andrea Bresolin
Andrea Bresolin

Reputation: 186

This is what you need to make AdMob work on Android 2.1 and higher:

  • in your AndroidManifest.xml file set <uses-sdk android:minSdkVersion="7"/> (this makes your app available for devices with Android 2.1 and higher)
  • in Eclipse go to "Project (menu)->Properties->Android" and make sure you select Android 3.2 or higher as the Project Build Target (this is the key to make all the items in configChanges known to the compiler at compile time)

Upvotes: 3

nhaarman
nhaarman

Reputation: 100398

Your android:targetSdkVersion should be high enough (e.g. 15), your android:minSdkVersion can be 7 for example. That way it should work with the newest AdMobSDK.

See also: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

Upvotes: 1

Related Questions