Specifying the Target SDK Version

You should always specify the targetSdkVersion attribute for your application.This value represents the Android SDK version your application was built for and tested against.

For example, if your application was built using the APIs that are backward-compatible to Android 1.6 (API Level 4), but targeted and tested using Android 2.2 SDK (API Level 8), then you would want to specify the targetSdkVersion attribute as 8.Therefore, add the following to your Android manifest file within the <manifest> tag block:

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

Why should you specify the target SDK version you used? Well, the Android platform has built-in functionality for backward-compatibility (to a point).Think of it like this:A specific method of a given API might have been around since API Level 1. However, the internals of that method—its behavior—might have changed slightly from SDK to SDK. By specifying the target SDK version for your application, the Android operating system attempts to match your application with the exact version of the SDK (and the behavior as you tested it within the application), even when running a different (newer) version of the platform. This means that the application should continue to behave in "the old way" despite any new changes or "improvements" to the SDK that might cause unintended consequences in your application.

Easy Software Profits

Easy Software Profits

Here's How Anyone Can Start, Build and Run their Own Successful Software Empire Without Knowing the First Thing About Programming, Scripting Or Any 'Coder' Stuff. There is no doubt about it software sells. Software has a high percieved value and it solves problems for people.  A claim that can't always be made for PDF books, Video products and the like.

Get My Free Ebook

Post a comment