How to write build time stamp into apk

后端 未结 10 635
别跟我提以往
别跟我提以往 2020-12-02 07:57
  1. Making some changes in Android Contacts package
  2. Using mm (make) command to build this application

Because I have to change and

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 08:04

    I know this is really old, but here's how I did it using ant within eclipse:

    build.xml in project root

    
        
            This ant script updates strings.xml application_build_date to the current date
        
    
        
        
    
        
            
            
        
    
        
    
            
    
        
    
    

    Then add an application_build_date string to your strings.xml

    
        your app name
        20140101
        ...
    
    

    Ensure the ant script is executed as a pre-build activity and you will always have a valid build date available to you within R.string.application_build_date.

提交回复
热议问题