What is the difference between minSDKVersion
and targetSDKVerion
?
AndroidManifest.xml:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
What is the difference between minSDKVersion
and targetSDKVerion
?
AndroidManifest.xml:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
Jorge,
minSdkVersion
indicates which minimum API is required to run the application.
In your case, minSdkVersion="14"
, indicates that it will not be possible to run the application if the user has the API prior to 14 (Android 4.0.0).
targetSdkVersion
indicates to which API your application was developed, when no value is assigned, the value of minSdkVersion
is assumed.
Excerpt of documentation about minSdkVersion
:
Caution: If you do not declare this attribute, the system assumes a value standard "1", which indicates that your application is compatible with all the versions of Android. If your app is not compatible with all versions (for example, it uses APIs introduced in the Level 3 API) and you did not declare the
minSdkVersion
proper then when installed on a system with an API level of less than 3, the application will fail at run time when trying to access unavailable APIs. Per this reason, it is true that declaring the appropriate API level in the attributeminSdkVersion
.
And it's still possible to indicate maxSdkVersion
, which means the maximum API to run your application.
Excerpt of documentation about minSdkVersion
:
Warning: Declare this attribute is not recommended. First of all, there is no need to define the attribute as a means of blocking the installing your application on new versions of the Android platform. By the project, the new versions of the platform are fully backwards compatible. Your application should function correctly in a new version, as long as you only use APIs standard and follow best development practices. In second place, note that in some cases, declaring the attribute may result in in your app being removed from users' devices after a system upgrade to a higher level API. THE most of the devices on which your application is likely to be installed will receive periodic system updates, then you should consider its effect on your app before to define this attribute.
There is a very detailed explanation in this documentation: link