简体   繁体   中英

how can i get the date of when i exported my apk

I'm trying to set some kind of a version number that will be updated automatically, as im adding and changing the code every time, i was thinking of just making the version number relate to the last date (ie 1.2.7.16 for 16.7) and show it somewhere on my app, so coworkers could check for related bugs.

so i'v make a simple string, but it is 2 much work changing it every time, would it be possible to somehow do it programmatically?
How can i make that string be the corelate to the date of then i export my apk?

Write a perl/python/your_language_of_choice script that does it for you before compiling. Put it into your build process. If you don't use a build script and you're a professional, its time to treat this like a real project and do things right.

BTW, better than date is to use the SVN/git/cvs/other version number, so you can backtrace to the exact code used in a bug report. If you aren't using source control, start NOW.

You may use a version control such as GIT. This kind of tools can help you versioning your application. This could help: http://www.vogella.com/tutorials/EclipseGit/article.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM