According to the Android Platform Usage Statistics by Google (which is continuously being updated every 14 days), Gingerbread, ICS and Froyo are being used by 57.5%, 20.9% and 14% people respectively. The APIs have significantly changed since Froyo. So, if we choose Froyo as the minimum SDK version for Android apps, we can serve over 95% of people. So, we recommend choosing Froyo (API Level 8) as the minimum SDK version.
As for the target SDK version, i.e., the version that should be used to compile the application, always using the latest SDK version is recommended. Thus we can take advantage of various features introduced in the later APIs (for example, Action Bars) while keeping backward compatibility down to Froyo. As of this writing, the latest SDK version is 4.1 - Jelly Beans (API Level 16).
However, after setting the target SDK version to the latest SDK, be careful with choosing APIs. Using an API of Level 11 would compile the application fine with target SDK Level set to 16, but running the application on a Gingerbread device would cause it to crash. For example, a commonly-used ListAdapter class is ArrayAdapter. In that class, to add elements to the adapter all at once, the addAll(List) method has been introduced in API Level 11. So, you cannot use that method while having the minimum SDK version set to API Level 8 (Froyo). The documentation of each method includes the information since which API Level the method has been introduced. So, you need to keep an eye on that so as to use a method compatible with the API Level set as the minimum SDK version. The same is true for constants as well.
Finally, to set the minimum and target SDK versions, open up AndroidManifest.xml and put the following line within the <manifest></manifest> tags (and before the <application> tag):
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="16" />
As for the target SDK version, i.e., the version that should be used to compile the application, always using the latest SDK version is recommended. Thus we can take advantage of various features introduced in the later APIs (for example, Action Bars) while keeping backward compatibility down to Froyo. As of this writing, the latest SDK version is 4.1 - Jelly Beans (API Level 16).
However, after setting the target SDK version to the latest SDK, be careful with choosing APIs. Using an API of Level 11 would compile the application fine with target SDK Level set to 16, but running the application on a Gingerbread device would cause it to crash. For example, a commonly-used ListAdapter class is ArrayAdapter. In that class, to add elements to the adapter all at once, the addAll(List) method has been introduced in API Level 11. So, you cannot use that method while having the minimum SDK version set to API Level 8 (Froyo). The documentation of each method includes the information since which API Level the method has been introduced. So, you need to keep an eye on that so as to use a method compatible with the API Level set as the minimum SDK version. The same is true for constants as well.
Finally, to set the minimum and target SDK versions, open up AndroidManifest.xml and put the following line within the <manifest></manifest> tags (and before the <application> tag):
