Versioncode and Versionname

Source: Internet
Author: User

transfer to original http://blog.sina.com.cn/s/blog_580a227a0101bdzb.html The first conclusion:Google has defined two version attributes for the APK: Versioncode and Versionname, which have different uses.
    • Versioncode: not visible to consumers, only for the application of the market, the internal identification version of the program, to determine the use of new and old.
    • Versionname: Show to consumers, consumers will be aware of their own installed version, the version numbers mentioned below are said to be versionname.
At the end there are three common problem solving solutions
    1. The same version number that corresponds to multiple versioncode what to do
    2. What if I publish a version of the Versioncode error?
    3. Issued to the application has a bug to change back to the old version, how to do?
Then talk about the cause and consequences   everyone in the use of software and applications, will involve the concept of version, we all know, such as Win xp,qq2012, Xiaomi desktop 1.6. There is a version, mainly because the software products have been developing and changing. The concept of a version can help consumers identify products at different times.   is the version that is presented in front of the consumer, and is often different from the developer's internal use. Development often uses numbers as a sign, such as 6.1.7600.16385, which is actually the version number of the first official version of Win 7, and win 7 The SP1 version number is 6.1.7601.17514, so a long string of numbers doesn't make sense to consumers, so it's usually easier to understand when a product is released. In the following section, the version of Win 7 for display is called [versionname],6.1.7601.17514, which is a version of the program logo called [versioncode]  early because the software is mainly responsible for its own distribution, upgrade, etc. So the version number is also quite free, each family has different specifications. But in recent years mobile devices have risen, and app stores such as App Store have been centrally distributed into the mainstream. To upgrade, for example, the store will be responsible for checking the version of the app on the consumer's phone and comparing it with the latest version in the store, if the version in the store is newer and the version on the consumer's phone is older, it will remind the consumer to upgrade.   This involves how to identify new and old problems. For the computer, the most reliable way of judging is the number, the number has many advantages: The program is easy to judge, simple format is not error prone, easy to identify the naked eye. So Google requires each app to record this installation package in the APK installation package [Versioncode], as long as you get the APK file, you can know its corresponding [Versioncode] is how much, the App store will use this [Versioncode] prevail, To determine the version. The larger the [Versioncode] number of the installation package, the more new. So developers in the development process, each of the new version as long as a little more this number can be. For example, the first version of [Versioncode] is 1, the second version is 2. Because developers may produce multiple, unpublished versions every day, this number will grow quickly.   After a period of development, this number will become larger, such as 16385, at this time for a consumer, such numbers are not very recognizable, such as win 16385 and win 17514 in the transmission of information is not good, not conducive to product marketing. So Google also support in the AKP installation package record [Versionname], you can call Win 7, win vista all no problem, canIn order to meet the needs of the market, communication, so [versionname] actually do not have the ability to compare new and old versions, just to show to the consumer to see.  In summary
    • Versioncode: not visible to consumers, only for the application of the market, the internal identification version of the program, to determine the use of new and old.
    • Versionname: Show to consumers that consumers will recognize the version they have installed. In general, the version number we're talking about is this.
As we run the App Store, we find that some developers encounter some problems. 1, the same versionname (version number), corresponding to a plurality of VersioncodeThis is very common, for example, after the release of the new version, a store feedback that there is a XXX problem, need to repair, customization, and so on, so the business to find a new version of the engineer, considering the minor version of the upgrade, the version number has not changed, but Versioncode has changed.
    • Possible problems: If this new version is only available in some stores, it will appear as 3.1, and a store version is actually newer than the B store. Already installed a new version of the user, will also be prompted to upgrade, this time users will be troubled, why I installed 3.1 and upgrade to 3.1? Some stores in order to catch up with the latest package, resulting in the channel package flows, affecting operational monitoring and analysis.
    • Solution: A. The version number should go up with Versioncode, and once the new version is released, it will be available in all channels.
2, published a versioncode wrong versionSometimes because the engineer accidentally, released a Versioncode too large version, For example 1.1.1.20 version of Versioncode written in 111, and 1.1.1.27 version of Versioncode written 11127, but later released 1.1.2 version want to continue the old Versioncode, with 112.
    • Possible issues: Users of version 1.1.1.27 will not be able to get the 1.1.2 version of the upgrade, because in the program it appears that 1.1.1.27 version is relatively new, at the same time, already using 1.1.2 version of the user, may receive an older version of the upgrade hint, than and downgrade back to the previous version
    • Solution: Actually very simple, because versioncode is not visible to the end user, as long as the increase is good, the above example, the new version of Versioncode directly take 11200 to live.

Versioncode and Versionname

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.