Change apk-file name

So you’ve build your first nifty little app in Android Studio and now you want something a little more original than app-debug.apk as your file name. I┬ámade a simple todo app, so I will use a mind-bogglingly quirky out-of-box name and I will go ahead call my file todo.apk.

You can use the following in build.gradle (Module: app).

Build.gradle (Module: app)

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            output.outputFile = file("$project.buildDir/outputs/apk/todo.apk")
        }
    }
}