/ Android

How to change generated APK name in Android Studio?


By default, Android Studio generates APK name like app-debug.apk or app-release.apk. But, i want to generate my own APK name. This tutorial will help you to change generated APK name. This is the simple one that works for me using Android Studio 3.

Edit module(app) build.gradle, and add below:

android.applicationVariants.all { variant ->
    variant.outputs.all {
        def appName = "YourAPKName"
        outputFileName = appName+"-${variant.versionName}.apk"
    }
}

This code will generate file with name: YourAPKName-1.0.apk

How to change generated APK name in Android Studio?
Share this