Thursday, August 02, 2012

Error when implementing AdMob into existing Android app



After a successful application of AdMob, next step to start your Ads business is integrate the AbMob into your apps. I am not going through the detail as, its really simple for person who can write your own apps.

I just want to share some experience during the implementation,  especially when your existing apps are developed based on Android 2.3 or prior version.

if you following the guideline from Google AdMob, you may get the following error

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


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


When your are using AdMob V6+, you apps SDK must be Android 3.2 (target SDK 13) or above. For new I recommend you to use Android SDK 4.0.3 (SDK 15), as Android 3.2 was for Tablet.

1. In AndroidManifest.xml, make the changed as below. remeber to setup your minSdkVersion, or your existing coding may not be run.



    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="15"/>

 2. Make the following changes in "project.properties" file
 
 
 
# Project target.
target=android-15


Please note after the implementation. you lay out will have become Android 4.0 stylus. UI appearance may be changed.




No comments:

Post a Comment