The meaning of compileSdkVersion, minSdkVersion, targetSdkVersion, buildToolsVersion in build.gradle

compileSdkVersion:

Compiled version: compileSdkVersion tells gradle which version of AndroidSDK to use to compile your application;

minSdkVersion :

Minimum SDK version: It means the minimum supported mobile phone version of your App. If your minSdkVersion is set to 16 (Android 4.0) , then Apk cannot be installed on mobile phones with systems below 16 ;

targetSdkVersion:

API target version: With the upgrade of the Android system, the behavior of the API or module of a certain system may change, but in order to ensure that the behavior of the old APK is still compatible with the previous one. As long as the targetSdkVersion of the APK remains unchanged, even if the APK is installed on the new Android system, its behavior remains the same as on the old system, thus ensuring the forward compatibility of the system to the old application. In layman's terms: it will tell the Android platform: this program has been fully tested in this version, there is no problem, and there is no need to check and judge the compatibility of the program; that is to say, if the targetSdkVersion and the API version of the target device At the same time, the operation efficiency will be higher;

buildToolsVersion:

Build tool version: is the build tool version number. Generally, each android version will have corresponding buildTools. The Android system is constantly being upgraded. Every time new features are added, new tools are needed to build, so old build tools cannot be used to build new versions. New build tools can build older Android versions, and new tools are compatible with older versions. Generally set to the latest;

According to the above: compileSdkVersion is used at compile time. minSdkVersion (maxSdkVersion) is used at installation time. targetSdkVersion is used when the app is running. buildToolsVersion is the version number of the build tool;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324478489&siteId=291194637