Introduction to the importance of Android version number and version name

Source: Internet
Author: User
Tags set time

When we first started to learn ANDROID , we probably didn't pay much attention to this versioncode in the manifest.xml file and versionname.

But in fact a good version of control, for us has a vital role.

Versioning is critical for releasing new releases and maintenance of versions in development, and versioning is important for the following reasons:

1. When installing the APP , users need to know the detailed version information, and when the existing version is upgraded, the correct installation of the new version is related to version control.

    such as: Install app versioncode=1 , the version number of the upgrade update is 2 ( versioncode=2 app Span style= "font-family: the song Body;" > updates can be installed properly. Conversely, if the phone is currently app 2 app Span style= "font-family: the song Body;" > The version number is 1 The replacement installation will fail at this time.

This means that the same app 's low version does not directly overwrite the high-version app that already exists in the installed phone (judged by version number (versioncode) ).

This gives us an improved maintainability and security of the software during the application upgrade maintenance process.

2. there is a reliable guarantee for other applications that want to search for or invoke the specified version number and version name.

When we publish multiple versions of the app on the market , such as different versions of the different types of terminals, we can use version control to find the right app.

3. for our own version of the update system or third-party app Market, also through the version number and version name to find and user terminal equipment or the application of the terminal app to show to the user. For the third-party APP Market, this version is even more critical, the decision to download the user after the compatibility of the judgment play a certain role in control.

So versioning cannot be overlooked, and we can control the applications we post to the market with effective versioning to get a better user experience.

How to set the version number and version name of your app, here's a quick introduction.

versioncode-------  (Versioncode) is a relatively important property. versioncode is a integer versioncode Set too large, it is best not to exceed the integer 1 versioncode=1 ), This is also the current typical and common practice.

Then, you can increment the value of Versioncode each time you publish an updated version . It is also described in the above description of versioning importance that a new version of the app's versioncode cannot be less than the versioncode value of the previous previous version , otherwise an error occurs when replacing the update upgrade , the system prompts you not to install. This is not mandatory, of course, but it is a question that must be considered when the application is officially released.

Versionname------This is a value ofStringtypes of properties, general andVersioncodeto appear in pairs. Versioncodeis to facilitate program developers to run and maintainApplicationinstead, a valid value is set. Versionnameis a version of the description, to the user to see, but also the user placed in the individual3A version name provided to the user on the side platform, which can be said to beVersioncodeexplanation and description. The general format can be:1.1.2(Major.minor.point) in the form of.

Here is an example of a manifest.xml file:

The above code indicates that the current . APK is the second version, with the versionname value 1.1 to see that this version is in the 1.0 version of an optimized retrofit version, the difference and 1.0 version is small.

If it is a UI style or a business logic with a larger adjustment of the application, the version will generally rise to a level, such as should be defined as 2.0

Other:

In the case of version number 2.1.3 , If the version number is 2.1.5, then the content of the two versions is not very large, roughly the interface and some performance adjustments and optimizations, if the version number is 2.3.3, the two versions of the content of a slight change, may be in the program some of the judgment and algorithm changes, if the version number is 3.1.2, the two versions of the content has changed a great change, For example, in the program's logical processing program to make adjustments to add new features and other aspects of the changes. In short, the more the previous number of changes in the software version of the change is larger, the subsequent changes in the number of the software is not much change.

Introduction to the importance of Android version number and version name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.