How to version(ise/ize) Android app properly?

半世苍凉 提交于 2019-12-11 04:25:07

问题


I am working on an Android app and I have put it on playstore for beta testing. So I can officially test my app in different countries as I have friends overseas. So my question is that as My app is in beta testing, I have discovered some bugs in my app and I am fixing them one by one and uploading app for more tests. This is my firs official Android app and I have just opened my android app developer account couple days ago. So I am not so familiar with how android's app versioning works.

I know about .. version format. So right now, my app's major Version release is 1. I have patched 2 bugs in it and posted on playstore so my friends can test it and send me feedback. To de this, I had to change versionCode in gradle file from 1 to 2. Because playstore was not letting me upload patched apk. Now I have patched few more bugs in my app and if I go and upload to playstore, I will need to change versionCode in my gradle file from 2 to 3. I know that playstore will display versionName in description but I don't know if I am doing right or not.

Lets say my app's current versionName is 1.0.2 as I have patched couple bugs in it. But my versionCode is 3. So in future I get 10 more bugs, one after fixing each than my versionCode will be 13 and versionName will be 1.0.10. And after that if I release minor version it will be 1.1.0 with versionCode = 14.

After that I fix some more bugs and release major version so my app's versionName will be something like 2.0.0 with versionCode = 25.

So am I doing it right or I need to change/learn something for it? I have searched about versioning and found some great tutorials about creating version.properties and all. But when I upload it to playstore, it keep saying me to change my versionCode from 1 or 2 to something else. And by something else I mean to increment.

Can anyone tell me what to do? Am I doing right or wrong?


回答1:


There are 2 things which are seen during versioning:

  1. Version Code
  2. Version Name

Now you can consider version code as your age, which is incremented whenever you celebrate your birthday, that is, version code is to be incremented, whenever you make a new build for Play store or you are sending the app via mail or drive. One reason for this is, in play store, it helps the google servers to differentiate between old and current release and in testing point of view you can filter the crashes in crashlytics based on this version code.

But when we talk about version name, its like your name, people might call you chhotu, chintu, etc. when you are young, they call you Viral when you are teen, they call you mr. Joshi when you are working, but it doesnt make a difference as its your age that exactly defines you.

In short, version code is to be changed after every build you make for testing, but version name is your choice. In general version name is changed when you make major bug fixes or UI changes. For small fixes you dont change version name in beta version. But when it is released completely, you can change the last digit of version name too after every release.




回答2:


versionCode can (should? personal choice really) be updated with each build, or at the start of each day you work on the code. A number that simply keeps increasing is all this needs to be. Start at 1 and keep going. Google Play Store requires an increase between updates.

versionName is for the Google Play Store or when you have built a stable version that is ready for testing with the intention of release. The format of this string is really up to you. Formats are often read like so:

  • 1.2.3 : 1 major version, major changes, 2 minor version, minor changes, 3 bug fixes.

  • 1.2 : 1 major version, major changes, 2 any changes.

You can (I think) even use a string like UltraLight or MegaUpdate for the versionName - it is up to you. It is used to differentiate between releases for the public.



来源:https://stackoverflow.com/questions/38865676/how-to-versionise-ize-android-app-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!