Build release apk with customize name format in Android Studio

前端 未结 3 1942
面向向阳花
面向向阳花 2021-02-07 16:11

I want the .apk to be built with the following name format (with timestamp).

How can I set it?

format : {app_name}{yyyymmddhis}.apk

3条回答
  •  鱼传尺愫
    2021-02-07 16:38

    You should change something like this. Doing dynamically.

    project.archivesBaseName = {app_name}{yyyymmddhis};

    But I have read that this is going to be deprecated.

    Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Deprecated dynamic property: "archivesBaseName" on "root project 'myapp'", value: "AnotherName".

提交回复
热议问题