Skip to content

Configure the default generated apk name

Guillaume Husta edited this page Jul 26, 2017 · 2 revisions

Problem

Default generated apk file names are app-debug.apk or app-release.apk.
It would be better to customize it, including the version name.

Solution

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId "com.company.app"
        minSdkVersion 13
        targetSdkVersion 21
        versionCode 14       // increment with every release
        versionName '1.4.8'   // change with every release
        setProperty("archivesBaseName", "MyCompany-MyAppName-$versionName")
    }
}

References

See :

Clone this wiki locally