Differences between Android sdkversion and methods of obtaining version information
1. What is the difference between minsdkversion, targetsdkversion, maxsdkversion and compilesdkversion?
• minsdkversion and maxsdkversion are the minimum and maximum SDK versions supported by the project. Before installing APK, the system will judge these two values to determine whether the current system can be installed. Generally, maxsdkverson will not be set.
• compilesdkversion is the SDK version when the project is compiled.
• targetsdkversion will tell the system that this version has been fully tested, so when the program runs on this version of the system, it will not make too many additional compatibility judgments, and the operation efficiency will be higher.
2. Get version information
What are the differences and uses of versionname and versioncode?
• Android: versioncode: it is mainly used for version upgrade. It is of type int. the first version is defined as 1 and will be incremented later. In this way, you can determine whether to upgrade as long as you judge this value. This value will not be displayed to the user.
• Android: versionname: This is the version number we often describe. This value is a string and can be displayed to users.
• versioncode is used to identify the version (upgrade) of the device program. It must be an integer, which represents how many times the app has been updated, and can be 1, 2, etc; Versionname is for users. You can write versions such as 1.1, 1.2, etc
Or get version information
The above article on the difference between Android sdkversion and the way to obtain version information is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.