Setting the Minimum Android SDK Version

Android applications can be compiled for compatibility with several different SDK versions. You use the <uses-sdk> tag to specify the minimum SDK required on the handset in order for the application to build and run properly. The android:minSdkVersion attribute of this tag is an integer representing the minimum Android SDK version required. Table 5.1 shows the Android SDK versions available for shipping applications.

TABLE 5.1 Android SDK Versions Available

Android SDK Version

Value

Android 1.0 SDK

1

Android 1.1 SDK

2

Android 1.5 SDK

3

Android 1.6 SDK

4

Android 2.0 SDK

5

Android 2.0.1 SDK

6

Android 2.1 SDK

7

For example, in the Droid1 project, you specified that the minimum SDK as Android 2.1 SDK:

<uses-sdk android:minSdkVersion="7" />

For example, in the Droid1 project, you specified that the minimum SDK as Android 2.1 SDK:

<uses-sdk android:minSdkVersion="7" />

Did you Know?

The version code needs to be incremented for published applications or testing purposes only, not each time you deploy an application onto a device for-debugging.

Each time a new Android SDK is released, you can find the SDK version number in the SDK release notes. This is often referred to as the API Level within the tools, especially the Android SDK and AVD Manager.

0 0

Post a comment