How to write build time stamp into apk

后端 未结 10 627
别跟我提以往
别跟我提以往 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条回答
  •  死守一世寂寞
    2020-12-02 08:12

    Edit: My answer does not work anymore since option keepTimestampsInApk was removed. Working in 2020 is https://stackoverflow.com/a/26372474/6937282 (also https://stackoverflow.com/a/22649533/6937282 for more details)

    Original answer:

    A hint for solution "last modification time of classes.dex file" an newer AndroidStudio versions: In default config the timestamp is not written anymore to files in apk file. Timestamp is always "Nov 30 1979".

    You can change this behavior by adding this line to file

    %userdir%/.gradle/gradle.properties (create if not existing)

    android.keepTimestampsInApk = true
    

    See Issue 220039

    (Must be in userdir, gradle.properties in project build dir seems not to work)

提交回复
热议问题