Change generated apk name from "app-debug.apk"

In build.gradle (Module: app):

android {
    ...
    defaultConfig {
        ...
        setProperty("archivesBaseName", "MyNewAppNameGoesHere")
    }
}

This works by modifying the archivesBaseName-property and works for Gradle Version >= 2.0, last tested with 2.1.0.


You can use applicationVariants and change the output file in the build.gradle. You can also modify the name regarding to your needs.

buildTypes{

    applicationVariants.all { variant ->                              
        variant.outputs.each { output ->                              
            output.outputFile = file("$project.buildDir/apk/test.apk")
        }                                                             
    }

}