Creating a Release Signed APK File Using Gradle

Creating a Release Signed APK File Using Gradle

6 June 2024 Stephan Petzl Leave a comment Tech-Help

When developing Android applications, one essential step is to create a release signed APK file. This process ensures that your application is properly signed and ready for distribution. In this guide, we will walk you through the steps to achieve this using Gradle.


Before we dive into the Gradle configurations, make sure you have the following:

  • A keystore file (e.g., release.keystore)
  • Keystore password
  • Key alias
  • Key password

Step-by-Step Guide

1. Configure Gradle Properties

First, store your keystore information in a secure location. Create a file in your home directory (e.g., ~/.gradle/ and add the following:


2. Modify Your build.gradle File

Next, you need to modify your build.gradle file to include the signing configurations. Add the following inside the android block:

android {
    signingConfigs {
        release {
            storeFile file(RELEASE_STORE_FILE)
            storePassword RELEASE_STORE_PASSWORD
            keyAlias RELEASE_KEY_ALIAS
            keyPassword RELEASE_KEY_PASSWORD
            v1SigningEnabled true
            v2SigningEnabled true
    buildTypes {
        release {
            signingConfig signingConfigs.release

3. Assemble the Release APK

Finally, you can build your signed release APK by running the following command in your terminal:

./gradlew assembleRelease

This command will generate a signed APK file in the build/outputs/apk/release directory, ready for distribution.


If you encounter any issues during the build process, ensure that all paths and passwords are correctly set. Additionally, refer to our documentation for more detailed troubleshooting steps:

Enhancing Your Development Workflow with Repeato

Automating the testing process is a crucial part of ensuring the quality of your mobile applications. Repeato is a No-code test automation tool for iOS and Android that helps you create, run, and maintain automated tests for your apps. With its computer vision and AI capabilities, Repeato allows you to focus on creating a great product instead of spending time on test automation.

Repeato is particularly fast to edit and run tests and is user-friendly enough for non-technical colleagues or QAs to use. This can significantly streamline your development process and improve your app’s reliability.

Learn more about how Repeato can benefit your development workflow by visiting our Getting Started page.

Like this article? there’s more where that came from!